When there is a need to debug p-code compiled code, generally, there are two options available: debug the p-code instructions themselves, or debug the restored source code.
The second option requires a high-quality decompiler that is able to produce something close to the original source code. Usually, VB Decompiler does this job pretty well. In this case, its output can be loaded into an IDE of your choice and after some minor modifications can be used for debugging as any usual source code. Often, it isn't necessary to restore the whole project as only certain parts of the code need to be traced.
While this approach is definitely more user-friendly in general, sometimes, debugging actual p-code may be the only option available, for example, when a decompiler doesn't work properly or just isn't available. In this case, the WKTVBDE project becomes extremely handy as it allows you to debug p-code compiled applications. It requires a malicious sample being placed in...