SDK Question Debugging an addon module in VS2010 (SSU)

mstram

Member
Joined
Oct 21, 2008
Messages
47
Reaction score
0
Points
6
Location
Toronto
Is it possible to set breakpoints / single step through an "add on module" using VS 2010 in either Orbiter 2010 / 2016 (2016 preferably ?)


I'm trying to debug the SSU shuttle in particular.

I have set :

Configuration Properties / Debugging / Command : C:\Orbiter2016\orbiter.exe
Working Directory : ..\..\..\..\Orbiter2016

I set an arbitrary/test breakpoint at a source line (e.g. ) at SimpleGPCSystem::SimpleGPCSystem
vSoftware.push_back( new MPS_Dump( this ) );, but the debugger doesn't stop at the breakpoint.

Start Debugging / F5, Orbiter launches as usual, bug Vc gives an alert that Orbiter has no debugging information.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
Yes, this is possible.

Did you compile the SSU sources with debug information enabled?
Did you configure the linker to drop the DLL in the correct location so it is picked up by the orbiter process?
 

mstram

Member
Joined
Oct 21, 2008
Messages
47
Reaction score
0
Points
6
Location
Toronto
Yes, this is possible.

Did you compile the SSU sources with debug information enabled?
Did you configure the linker to drop the DLL in the correct location so it is picked up by the orbiter process?

1) Yes debug is on (configuration Active(debug)
How can I verify debug info is present in the files ?

2) I'm just copying the compiled modules to C:\Orbiter2016\Modules

The updated modules are working, just can't debug them.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
2) I'm just copying the compiled modules to C:\Orbiter2016\Modules

Then Visual Studio won't connect the debugger to the orbiter process. Maybe you can attach it manually, but it's easier just to set the correct target location for the linker.
 

mstram

Member
Joined
Oct 21, 2008
Messages
47
Reaction score
0
Points
6
Location
Toronto
Then Visual Studio won't connect the debugger to the orbiter process. Maybe you can attach it manually, but it's easier just to set the correct target location for the linker.

Well what else do I need to set other than :
Debugging / Command : C:\Orbiter2016\orbiter.exe ?
 

mstram

Member
Joined
Oct 21, 2008
Messages
47
Reaction score
0
Points
6
Location
Toronto
Linker / output file: C:\Orbiter2016\Modules\whatsitsname.dll

It's set to ..\..\Modules\SpaceShuttleUltra.dll

I just tried it again, debug, launches Orbiter, set breakpoint (at OrbitDap.cpp / OrbitDAP::LoadCurLVLHManeuver / CurManeuver.IsValid = true;) .... executed Item 19 from the Shuttle "keypad" .... no break.

Maybe something particular about SSU is not permitting debugging ?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,625
Reaction score
2,343
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
No idea about the 2010 settings, I used 2013 before and currently setup SSU for VC 2015. Would need to look at the debug configuration.

Usually, it does work.
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,921
Reaction score
2,934
Points
188
Website
github.com
For debugging usually set the breakpoints, compile, start the Orbiter launchpad, in VS go to "Tools > Attach to Process" and select orbiter.exe from the list, and then start the scenario.
 

mstram

Member
Joined
Oct 21, 2008
Messages
47
Reaction score
0
Points
6
Location
Toronto
For debugging usually set the breakpoints, compile, start the Orbiter launchpad, in VS go to "Tools > Attach to Process" and select orbiter.exe from the list, and then start the scenario.

Working now ! (After Tools / "Expert Settings")

Thanks !
 
Top