question

Joe S2 avatar image
0 Likes"
Joe S2 asked Kavika F commented

Error debugging, Flexsim.pdb not loaded

Good Morning,

I've been updating a module from Flexsim 2020.2 to 2022.1 and I've been getting some strange results. In an attempt to debug how the code is producing these results I've attached the process to visual studio 2022 with some breakpoints in the code from my module

However, upon triggering my module's function call I immediately get the following error and both VS2022 and Flexsim hang (before any variables are initialized).

1651845525549.png


Does anyone have any idea what may be causing this and how I can fix this?

Thank you,

Joe Szalko

FlexSim 22.1.0
module sdk
1651845525549.png (126.0 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kavika F avatar image Kavika F ♦ commented ·

Hi @Joe S2, was Phil BoBo's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered Phil BoBo commented

First, you cannot debug FlexSim's initialization code. FlexSim will purposefully crash if a debugger is attached when it is initializing the licensing system. If you want to debug your module, you need to attach to the process after FlexSim has initialized.

Second, you cannot debug the FlexSim engine code in FlexSim.dll. You don't have the debug symbols to debug the FlexSim engine, which is why it is displaying an error about FlexSim.pdb. You are trying to debug code within FlexSim.dll.

Start FlexSim, put a breakpoint in your module dll code, attach to FlexSim, and then perform whatever action is necessary for your module's code to execute and catch the breakpoint.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joe S2 avatar image Joe S2 commented ·
This process is actually what I attempted to do and in the order I did it in.


Open Flexsim -> Load Model -> open Module code -> attach to process -> add break point -> run model -> got strange pdb error.
0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Joe S2 commented ·

Based on the screenshot you posted and the description of the steps you took, it appears that your model threw an exception when you ran it, Visual Studio caught the exception and displayed a message that it couldn't display the source code file because it is missing debug symbols for FlexSim.pdb. That's not strange.

You should fix the exceptions happening in your model.

Or uncheck "Break when this exception type is thrown", press Continue, and ignore the exceptions.

0 Likes 0 ·