Debugging a C++ DLL called from BlitzMax
BlitzMax Forums/BlitzMax Programming/Debugging a C++ DLL called from BlitzMax
| ||
Is there any way to debug a DLL written in C++ with Visual Studio 2008, as it is being called from BlitzMax? All the BMX debugger tells me is the DLL functions that program crashes on. It would be very useful if there was a way to debug the C++ side of things as it is being called from BMX. |
| ||
Hey Josh, Never done it myself but it seems so... Found this Edit :- helps if I post the link!! lol. Last edited 2011 |
| ||
Maybe you'll need the source though? or maybe some c++ code to call the bmx .exe |
| ||
I have the project and source for the C++ DLL. |
| ||
Load the dll project into visual studio, ensure target path is same as one Blitz prog is loading dll from, set some breakpoints in visual studio, run debug, set exe when asked to the BlitzMax program that is calling the dll and you're off. Last edited 2011 |
| ||
Does the DLL build path need to match the DLL that BMX loads, if they are identical? I have a post-build event that copies the built DLL into the BMX prog's directory, where it is loaded from. |
| ||
That should be fine. The trick is to "run" the dll from visual studio, and have it launch your BlitzMax exe for you. |
| ||
Thanks, it works! :D Make sure you go to project Properties > Linker > Command Line and add "/DEBUG" in additional options. Now I can catch crashes that occur when a BlitzMax program calls my C++ DLL! |