Debugging JXA in VS Code

305 views Asked by At

I'm trying to debug some JXA code in vs-code. I'm using @jxa/run and ts-node

import "@jxa/global-type";
import { run as runJXA } from "@jxa/run";

async function run() {

    console.log('I can put a breakpoint here!  :)   ');

    return await runJXA((config) => {

          console.log('I can't put a breakpoint here :(  ');
    });

}

run()

I run VS Code debugger via launch.json config:

    {
        "type": "node",
        "request": "launch",
        "name": "Debug JXA Build",
        "runtimeArgs": [
            "-r",
            "ts-node/register"
        ],
        "args": [
            "bootstrap.ts"
        ]
    },

How can I get the second breakpoint to hit?

0

There are 0 answers