Program crashed outside VS or XIDE

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

Program crashed outside VS or XIDE

Post by Juraj »

As in x# to find out the procedure and code line on which the program ended in error? As it was in VOError.log in VO
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Program crashed outside VS or XIDE

Post by robert »

Juraj

Error handling in DotNet is somewhat different from Error Handling in VO.
In VO there is the concept of a global error handler.
Such as thing does not exist in DotNet.
The closest thing to that would be to setup a try .. catch in your main application loop and then in the catch you can inspect the exception and log it to disk.
The exception will hold the callstack so you can see where the error occurred.
If you want sourcefilename and linenumber in the callstack then you need to include PDB files with your application.
This does not have any effect on the performance of your app, since the pdb file is only used when you inspect call stacks (unless your Vulcan app uses lots of calls to the ProcName() and ProcLine() function, because these functions als use the callstack and retrieve information from the PDB file).

You can also produce a PDB file when you compile in Release mode. On the "debug properties" tab from your project properties you can choose to include 'full' debug information or 'pdbonly'. For apps in release mode I would choose 'pdbonly' and Optimize = true (on the Build tab).

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply