chriscamicas / vscode-abl

An extension for VS Code which provides support for the Progress OpenEdge ABL language. https://marketplace.visualstudio.com/items?itemName=chriscamicas.openedge-abl
MIT License
50 stars 37 forks source link

Debug issues when "stepping into" #59

Closed dtrockel closed 4 years ago

dtrockel commented 4 years ago

vscode-abl-debug.txt When I step into a method call of a class not defined within the file im debugging, VS Code is giving me the message

Could not load source '.\phComponents\Common\Tools\Fiscal\Fiskaly\Fiskaly.cls'.

all the while the variables list on the left suggests that the class got loaded correctly. Do I have something within my config set up incorrectly or is there a bug with relative pathts maybe?

My launch.json :

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Launch",
            "type": "abl",
            "request": "launch",
            "program": "${file}",
            "cwd": "${workspaceFolder}",
            "trace": "verbose",

        },
    ]
}

My .openedge.json:

{ 
    "parameterFiles": [ "C:/prohandel/src/su.pf"], 
    "workingDirectory": "C:/prohandel/src",
    "proPath": [
        "${workspaceFolder}"
    ],
    "dlc": "C:/DLC11.5", 
    "proPathMode": "append", 
    "dbDictionary": [
        "prohandel",
        "prokasse",
        "prodruck",
        "proplan"
    ]
}

The verbose output of the debug console is attached.

chriscamicas commented 4 years ago

@SamiKoh could you try to reproduce this error please ?

RobinHerbots commented 4 years ago

Hi @chriscamicas,

Due to changes in my professional live, I'm no longer interested in contributing. But a colleage of mine would be glad if he can help the project. Maybe you can invite him. @mstab

chriscamicas commented 4 years ago

Thanks for the update, he's free to participate, and may be a regular contributor if he likes.

SamiKoh commented 4 years ago

I cannot confirm. When I enter a breakpoint in class method not defined in the file I'm debugging, I see no error message, vscode opens that file and execution stops on the breakpoint.

image

When I step out, variables pane shows that the class loaded.

image

However, it seems that ${workspaceFolder} is not defined within debugger and some relative paths do not work. I had to switch to absolute paths in .openedge.json to be able to launch debugger. Attaching to existing process works with relative paths though.

@dtrockel my suggestion: try it with putting absolute paths in proPath array in .openedge.json

dtrockel commented 4 years ago

Hey, @Samikoh thanks for the reply.

Only using absolute paths in the propath array solved the issue, thanks!