Windows: Debug modules/plugins
How to debug samples/plugins in Visual Studio
By default Kudo Server runs each session in its own process. That allows a maximal session isolation but complicates debugging. If you need to debug your module locally, it is recommended to change the server’s session management options to run the server and a session in a single process.
The session management options can be found in wt_config.xml located at {InstallDir}\Kudo\Resources\approot\. We strongly recommend to backup original wt_config.xml before you make changes to it.
Default session management options are:
<session-management>
<reload-is-new-session>true</reload-is-new-session>
<dedicated-process>
<max-num-sessions>100</max-num-sessions>
</dedicated-process>
<timeout>900</timeout>
</session-management>
To run the server and a session in a single process, you can change it to shared-process:
<session-management>
<reload-is-new-session>true</reload-is-new-session>
<shared-process />
<timeout>900</timeout>
</session-management>
This makes debugging easier but please note that with this option it is possible to only run one session, so you need to restart the server application for each session you want to debug. If there is/was already a session created, you will see this
when open a URL from browser.
For details about all server configuration options, also refer to ARES Kudo Server Configuration.
How to debug with <shared-process> option (recommended)
Stop the ARES Kudo Server service
Make sure you changed session management option in wt_config.xml to be shared-process.
Open {InstallDir}\ARESKudoServerService.xml to get relevant command path and parameters
Open project properties of your VS project
Copy the editor.exe path from <executable> tag in ARESKudoServerService.xml to Command in project's Debugging settings
Copy parameters from <arguments> tag in ARESKudoServerService.xml to Command Arguments in project's Debugging settings
Start debugging (F5)
Open an URL to open a drawing in your browser what should start a drawing session in your current process running in the debugger
How to debug with <dedicated-process> option
It is also possible to debug sessions in VS that were started with the dedicated-process option.
Open Debug ->Attach to Process… in VS
Check for editor.exe processes
One is the main server process and others are the dedicated session. It could be a bit challenging to find the correct process, so we recommend to use shared-process option for debugging insteadSelect the process you want to attach debugget to and press Attach…