Debugging is a very helpful and often necessary process to track down exactly whats going on inside your code and fix errors. Max.NET allows for native .NET application debugging and this document describes the easy steps to set up debugging for your project.
A special Debug configuration is generated by Visual Studio (and other IDE's) that prepares your project for debugging. This preparation includes outputting debug symbols database file (.pdb) and disabling any code optimization and obfuscation. To begin debugging put your solution into debug configuration.
It is often useful to set breakpoints in your code where you can observe the stack trace at a particular time and context in your code. The breakpoints are usually set in a critical part of the code that you want to test.
To enable debugging you need to make sure that you copy the .pdb file along with your .dll file into the same directory.
Visual studio contains a special "Attach to process..." option in the debug menu. Use this to attach 3dsmax.exe process when it is running.
Once the executing of code reaches one of the breakpoints you set (or an unhandled exception) you will see the breakpoint hit in your IDE. At this point you can browse the stack frame, stack trace, and perform modifications.