APerricone / harbourCodeExtension

Antonino Perricone's extension for visual studio code about Harbour and xHarbour programming languages
32 stars 20 forks source link

Debugger Fails in latest Windows 10 Pro and Windows 11 Home and Pro #84

Closed EricLendvai closed 2 years ago

EricLendvai commented 2 years ago

I think a Windows 10 Pro update messed up the ability to debug using this wonderful extension. Even tried on a brand new Windows 11 Home machine. I have a very simple Hello Harbour program in one of my repos: https://github.com/EricLendvai/Harbour_Samples/tree/main/HelloHarbour It as a simple altd() in https://github.com/EricLendvai/Harbour_Samples/blob/main/HelloHarbour/HelloHarbour.prg I can compile and run in release mode, but in debug mode, it is like the altd() is ignored and the debugger never stops. When I use the stop (red square) after the program finished to output messages, I get the TypeError message.

I did completely uninstalled VSCode and deleted all settings and extensions. Installed the latest VSCode and your latest extension and only 2 other ones. RwaJaIDMtwwnMGN0

APerricone commented 2 years ago

I tried on my PC with latest updates with no problem, are you sure that the antivirus or the firewall does not block the debugger port? default is 6110, it is defined on the beginning of debugger library you can change it changing the define and adding a "port" element on launch.json

EricLendvai commented 2 years ago

I did turn off the firewall and antivirus, even tried to change to port 80, still no luck. Is there a tracing I could do to locate the problem ?

EricLendvai commented 2 years ago

FYI Alex Strickland also reported the same problem. Please see https://groups.google.com/g/harbour-users/c/CS1n2RYTEo0 Thanks, Eric

EricLendvai commented 2 years ago

Hello Antonino, I have now spent a few days trying to resolve the problem. I have a working version of the extension, meaning where the debugger stops, in one of my VMs (using VMware Workstation), and the host machine where if fails. I even installed the same antivirus program in the VM, and it still works. Now I am trying to trace the debugger.prg trying to monitor PROCEDURE __dbgEntry( nMode, uParam1, uParam2, uParam3 ) I tried logging to DebugView, but that hang the program, tried to write to a log file, same result. What is a good method to tracing the debugger itself? Can we have a Skype or zoom meeting? Please send an email to me. I did communicate via email to you before. Thanks for any help, Eric

APerricone commented 2 years ago

I experimented one similar toady and I thought to be able to resolve this issue, but it was result that the program spawns and finished istantly. You can see ithis case if change the terminal type to external. In my case was because I was trying to start a 32bit application with 64bit dlls. I added some output in this case, but I don't think It resolve your issue

APerricone commented 2 years ago

I think I experimented this issue today... I was not able to solve it my own, I asked help to Microsoft: https://github.com/microsoft/vscode/issues/158687

EricLendvai commented 2 years ago

Hello Antonino, It seems the debug sever is not giving a response. Snag_25efabdd Attached is also an altered version of your debugger code I changed to help me see where I think the problem is.

vscode_debugger.zip

EricLendvai commented 2 years ago

Hello Antonino. Tried the 1.0.4 version, but it fails. No code runs in debug mode. I did send you an email about this. Thanks for all your help !!!

EricLendvai commented 2 years ago

Hello Antonino. I installed the official release 1.0.4 version, but it still fails. I am seeing a log of "socket error Connection closed" error messages. image

EricLendvai commented 2 years ago

After a month + of having this issue, I finally found the problem.

I am using the Acronis backup system which now has new security system. All you need to do is to set the Windows service "Acronis Cyber Protection Service" to start "Manual", reboot, and now you can finally debug in Harbour.

Hope this will help others, Eric

APerricone commented 2 years ago

Really glad that you found the problem, maybe it is relative to the issue I faced using the Visual studio C debugger, that I solved with this change. Regards