Jump to content
JohnLM

Cannot debug delphi code in the Python4Delphi Demo1 project - [Solved]

Recommended Posts

Specs:  Delphi XE7, VCL, Win7, Python4Delphi v3.8.10 (the last official build for windows 7) 

 

In one of my projects that includes P4D, I discovered that I can not debug the code.   Note, I am not debugging the Python aspects, just the Delphi code only, such as when you put a breakpoint at the line aString="ABCDEFG", as seen below.  Note also, that I am giving a simplified example, (where you see the breakpoint) just to show the issue. 

 

Note:  this is for any projects that include Python4Delphi. 

 

2047812441_im-praxis-cannotdebugp4dprojects1.thumb.png.b1a71c7b05c18fb528c67600af3ba9b9.png

 

And the final result after pressing F9 (compile with debug). . . 

 

302261159_im-praxis-cannotdebugp4dprojects2.thumb.png.eeb93bd6dc3cdd08bbb65b55032aa60c.png

 

And, when I switch to 32-bit target and compile via F9, I get the following different issue: 

 

[dcc32 Fatal Error] Demo01.dpr(7): F2048 Bad unit format: 'Unit1.dcu' - Expected version: 28.0, Windows Unicode(x86) Found version: 28.0, Windows Unicode(x64)

 

I do not know how to resolve this.  I would like to do some debugging in my P4D projects but can't. 

 

Any advice would be greatly appreciated, thanks!

 

Edited by JohnLM
typos and additions

Share this post


Link to post

Delphi XE7 -- After some further investigation and research, it turns out that the debugger is not active in *any* 64-bit VCL and FMX applications.   I have the same error message shown in my first post, shown in the second image.  Only 32-bit apps have debugging working.   But the issue with the 32-bit debugging indicated in the previous post, 3rd example, is a separate issue with the P4D, I guess. 

Share this post


Link to post

Another update. . . solved!!

 

Okay.  I believe I have resolved the issue with getting the debugger working in projects with Pytho4Delphi.   

 

My particular issue was with having a TFrame in the Python4Delphi project.  I had it as a 32-bit, while the main app was 64-bit.  And, when I changed both to 32-bit and recompiled via "Build-All Projects", then the debugger would work. If I had just only did a regular compile, the debugger would not work. 

 

Note, but still no debugger for 64-bit apps.  I did not know this was the case for XE7 because most my apps were 32-bit.  Oh well.  

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×