Setting up google cloud debugger with webpack and typescript

199 Views Asked by At

I'm trying to set up google cloud debugger in a project that compiles typescript using webpack to a single file with a source map. When I try to set a breakpoint in the debugger interface I'm getting an error "Unable to set breakpoint in v8".

The code I'm trying to debug is in a service that's in a subdirectory of the repo:

root
| package.json
| source-context.json
| - services
|   package.json
|   server.ts // Agent configured in here.
|   - build
|     server.js // File that is actually executed
|     server.js.map

The code I'm using to configure the agent is:

require('@google-cloud/debug-agent').start({
    serviceContext: {
      service: 'awesome-services',
      version: process.env.RELEASE_TAG || 'unknown',
      enableCanary: true,
    },
    sourceContext: require('../source-context.json')
  });
}

Is there some configuration I'm missing here or some way to get more information for debugging?

0

There are 0 best solutions below