• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Debug DLLs

KWB

Messages
69
Country
germany
Debug DLLs, only Release (not Debug) version starting

Unmanaged code / C++ / VS2010: I am trying to get a simple .dll (e.g as here) running in FSX. Since I do not see the expected result, I try to debug the whole thing - which somehow is very tedious for me.

  • Q1) How can I tell at all, that the dll is even started? Is writing to a log file the only option, or where would some stdout information go? The only thing I've notice is that particular "trusted dll question" (regarding my dll) when starting FSX. But then I am lost :eek:.
    See Result 1 below
  • Q2) Has someone ever attached the VS2010 remote debugger to FSX? I can not set a breakpoint, because my symbols are not loaded. I have placed my symbol file in virtually every place it would make sense: in the dll path, in FSX root path, in the modules dir :confused:.
  • Q3) My dll.cfg file contains <DllStartName>module_init</DllStartName <DllStopName>module_deinit</DllStopName>. Also the dll contains DllMain, DllStart, and DllStop. None of these functions seems to be invoked, any idea why? I also wonder why the documentation is featuring this <DllStart|StopName>, and none of my external dll are using this.

Any hints are appreciated? Is there some debug setting I can activate?

Result 1:
The functions seem to be invoked if I compile as release version, but not if I compile as debug version. What could be the cause for this?
 
Last edited:
The functions seem to be invoked if I compile as release version, but not if I compile as debug version. What could be the cause for this?

Depending on your language (C++ or managed .NET) then the debug version of a dll contains code that is not present in the release version. It may be that FS does not like this debug code.
 
Debug vs release version

Depending on your language (C++ or managed .NET) then the debug version of a dll contains code that is not present in the release version. It may be that FS does not like this debug code.

I am writing unmanaged code in C++. The question I do have now is a) how could I avoid this issue and b) what exactly is the root cause. Yes, "debug" contains extra information (symbols) and less optimization. But why is the code rejected by FSX? And c) how can I really tell (besides the fact it is simply not working), can I get some feedback (log) of FSX?

If I cannot run a debug version, logically I cannot run debugging sessions (even I still do not know how to attach the debugger (see above). That's bad.
 
I am sorry but I can't really help on that. I have no idea why FSX rejects debug code

Sorry
 
Debugging DLL (module) with VS2010

Here my findings:

  1. I need to compile as "Multi-threaded DLL (/MDd)", "Debug dll" does not run.
  2. Some dlls contain a debug break (e.g. bglmanx.dll), so disable them for debugging -> "no source available" and FSX crash
 
Back
Top