Quantcast
Channel: GetCOREInterface
Viewing all articles
Browse latest Browse all 44

3ds Max Public Debug Symbols - Updated with complete instructions

$
0
0

Hi All, Almost 5 years ago, I wrote the original article here about public debug symbols. I had some recent questions about debug symbols and realized that a link in the original article was not working, so wanted to complete the whole story here again. Autodesk 3ds Max is a unique product in the company's portfolio. The engineering team for 3ds Max is keen on helping the developer community as much as possible. With that, they are providing 3ds Max debug symbols via an online symbol server. These are public symbols that are stripped, so there is no source code information. However, the symbols can show you very quickly were a problem may be coming from, especially given the many different ways you can derive C++ plugins and utilize the virtual callbacks from 3ds Max.

This article describes the steps to setup and use the symbols to get extra call stack details when debugging. To setup the Visual Studio to use the public symbol server, first click the debug menu and choose options. Then follow these steps in the Debug Options dialog:

  1. In the left list, choose Debugging -> Symbols
  2. Click the folder Icon in upper right
  3. In the blank space added, enter http://symbols.autodesk.com/symbols , and make sure the check box is checked.
  4. If you want to store the symbols offline in a different location from default, enter the location in the "Cache Symbols in this directory"
  5. Select the "All Modules, unless excluded" option to load all the 3ds Max modules during a debug session. Note this applies to all the symbol locations checked. For example, the default includes Microsoft Symbol Servers, so those will also load as needed. You can hone this down by using the "Only specified modules" but it takes more time to setup and figure out. You can also check/uncheck the symbol servers as a whole to control other servers (like uncheck Microsoft Symbol Servers) if you only want to use 3ds Max symbols.

    See the below screen capture:Debug01

After the setup, you can set breakpoints, and then start debugging. First, remember that even though we are debugging a plugin in 3ds Max, using the production version, we need to use the "hybrid" configuration so that the various run-times are production, and not debug. When starting 3ds Max in a hybrid debug mode, you will see in the output window whether the symbols are loading for each module. For example:

Debug02

After 3ds Max is fully started, you can now start debugging and you can stop in break points within your plugin, and if 3ds Max symbols have call stack information in the context of your debugging session, it will be displayed in the call stack window. For example, in a basic UtilityObj plugin, during the BeginEditParams routine, you can get the following enhanced call stack:

Debug3

Without the symbols being loaded, the same location will look like below, and you will only see memory locations.

Debug4

 

When public symbols first became available, FCS symbols were the only versions uploaded, but since around 2015, update versions have also been included. The symbol server should always contain all public releases with matching symbols. If you run into trouble about symbols loading, make sure all the options are correct, and after double checking if they are not loading, feel free to ping me and I can double-check they are present on the symbol server. 

 

Hope it helps! Happy Fall!


Viewing all articles
Browse latest Browse all 44

Trending Articles