marcellourbani / vscode_abap_remote_fs

Remote filesystem for ABAP systems
MIT License
170 stars 28 forks source link

Debugging ABAP with VS Code #217

Closed maggiv8 closed 4 months ago

maggiv8 commented 4 months ago

Please see comment below for details

maggiv8 commented 4 months ago

Hi there,

after using VS Code now for a few of my developments I am still struggling with using the debug functionality. I do have a dummy report in my local repository (i.e. ‘$tmp’). Here are the steps I am performing when trying to start debugging:

  1. Set breakpoint: Screenshot from 2024-05-06 13-18-22

  2. Click on ‘Run → Start Debugging’ (or ‘F5 alternatively)’.

  3. VS code connect ot the ABAP server: Screenshot from 2024-05-06 13-23-37

  4. However, it doesn’t stop at the breakpoint I have set even when clicking on ‘Restart’ (or ‘Ctrl’ + ‘Shift’ + ‘F5’).

I have checked a few tutorials online about Debugging ABAP on VS Code, but somehow I can’t convince VS Code to stop at my breakpoint.

Any help would be highly appreciated. Thank you. Best, C.

marcellourbani commented 4 months ago

SapGUI debugging is not supported, as requires contolling it and I don't know how. sbsp unit , RFC cannl and webservices work ok

maggiv8 commented 4 months ago

@marcellourbani : I understand from your comment that based onthe current release you cannot debug reports for example. Thank you for claryfing. However, it seems you can create a unit test for a class und then test this class if I understand the following blog from you correctly: https://community.sap.com/t5/application-development-blog-posts/debugging-abap-in-visual-studio-code/ba-p/13500931

How exactly do you do that and what are the steps to trigger such a unit test with debugging enabled? For example: I created a class, pressed 'F5' for debug and then 'Ctrl + shift + F11' for unit testing, but it stil ldoesn't stop at the set breakpoint. Any more help and guidance would be highly appreciated. Thank you.

marcellourbani commented 4 months ago

That should work If you give me access I can troubleshoot

marcellourbani commented 4 months ago

@maggiv8 Your demo class has no unit test. I created one who does and debugger works fine:

image

maggiv8 commented 4 months ago

@marcellourbani : thank you so much for clarifying. It works now :+1: