CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
429 stars 118 forks source link

[Question] Could I build fmpy into exe to debug my fmu? #670

Closed LxZ-1002 closed 5 months ago

LxZ-1002 commented 5 months ago

I fail to find an approach to debug my fmu directly with py. It doesn't work with "attach to process (fmpy.gui)"

t-sommer commented 5 months ago

You should be able to attach your debugger to the Python process. Can you provide steps to reproduce the problem?

LxZ-1002 commented 5 months ago

I am able to attach my debugger to python.exe, but the breakpoints have never get hit at all.

I've built a fmu dll from my C code, imported it to Matlab Simulink, added some Simulink blocks and generated a parent FMU that uses my fmu dll as child. The parent fmu runs perfectly with fmpy. Now I want to debug my fmu dll and am facing the problem described above.

t-sommer commented 5 months ago

This does not seem to be an issue related to FMPy. You might want to take a look at fmusim (https://github.com/modelica/reference-fmus) if you're looking for a simple simulator to debug your FMUs.

LxZ-1002 commented 5 months ago

This does not seem to be an issue related to FMPy. You might want to take a look at fmusim (https://github.com/modelica/reference-fmus) if you're looking for a simple simulator to debug your FMUs.

The problem is not meant to be FMPy related. That's why I just asked the possibility to build fmpy into exe so that I can avoid "attach to process" for debugging. Thank you for your hint anyway.