Expand my Community achievements bar.

SOLVED

Debug Adobe IO runtime application using VS Code

Avatar

Level 9

Hello Team, I took the code from: https://github.com/AdobeDocs/adobeio-codelabs-barcode
Ran the command: aio app run --local

Able to use the URL: http://localhost:3233/api/v1/web/guest/my-barcode-app-0.0.1/barcode?value=adobe

 

Wanted to check, how to debug the application using VS code editor?

I can see below details in the cmd, while running the command: aio app run --local

 

i setting up vscode debug configuration files...
- create .vscode\launch.json

 

cc @arunpatidar   @sarav_prakash  @mk_aem21 

1 Accepted Solution

Avatar

Correct answer by
Level 8
4 Replies

Avatar

Correct answer by
Level 8

Avatar

Level 9

Thanks a lot @sarav_prakash   for your quick help. Much appreciated. 

Avatar

Level 7

 

To debug your Adobe I/O Runtime application using VS Code:

  1. Run Locally: Ensure your app is running with aio app run --local.

  2. Create Debug Config: Add the following to .vscode/launch.json:

 

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/node_modules/.bin/aio",
      "args": ["app", "run", "--local"],
      "env": { "DEBUG": "*" },
      "port": 9229
    }
  ]
}

 

  1. Run Debugger: Press F5 to start debugging.

  2. Set Breakpoints: Set breakpoints in your code and inspect them when the app hits the URL (http://localhost:3233).

This will let you debug your Adobe I/O Runtime application locally.

Avatar

Level 9

Thanks a lot @AmitVishwakarma  for your help