Forge UI KIT App Debugging VS Code - Breakpoint can not be set

Hi,
i bulding a forge ui kit app and struggeling with the debugging in vs code. I setup Debug Forge functions using VS Code , but i can not set breakpoints.

VS Code says :red_question_mark: We couldn’t find a corresponding source location, and didn’t find any source with the name index.js.

How did you expect this file to be loaded? (If you have a compilation step, you should pick ‘sourcemap’)

He generated some files

after setting up to this with outfiles

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Attach Forge App Debugger",
            "type": "node",
            "request": "attach",
            "port": 9229,
            "sourceMaps": true,
            "outFiles": [
                "${workspaceFolder}/.forge/tunnel-output/bundled/**/*.cjs",
                "${workspaceFolder}/dist/**/*.js",
                "${workspaceFolder}/.forge/tunnel-output/*.cjs"                
            ]
        }
    ]
}

i can setup aq breaqkpoint in the cjs file and it stops there, but have the breakpoint not to be setup in the sourcecode ?

I dont know how i can make it run to debug the resolvers.
I get it right that the ui cannot be ddebugged ?

Please make sure you following https://developer.atlassian.com/platform/forge/debug-functions-using-vscode/ correctly. I notice in your launch.json file, you tried to set outFiles. You don’t need to do that. Please refer to the launch.json file we provided on the guide.

Assume you follow the guide correctly. Please try it twice.
So what I mean is:

  1. Set breakpoint in your app source code, not generated file → trigger the code, probably at Atlassian Product like Jira
  2. If the breakpoint is hit. That’s good.
    a. If breakpoint not hit. That’s fine. Just make sure waiting for the current invocation completed.
    b. Keep the current tunnel session. Repeat the step 1 again. This time, I expect the breakpoint is hit. Please let me know if you still have problem.

Looking forward to hearing your result.

1 Like

Hi,

thx for the fast answer.

After changing the launch.json i can set Breakpints in the debug view every time it strops and runs well. Great.

When i go directly in the source in the ditor it isnt working, but this is i think not a topic

because the project folder nad projectname is not in the path .

It works nice. THX.

BR
Kai