Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

SourceMapper should support input paths being suffixes of on-disk paths #226

@ofrobots

Description

@ofrobots

While moving the repo structure I ran into the a test failure with test-v8debugapi.js. The test is trying to set a breakpoint in test/fixtures/coffee/transpile.coffee. Sourcemapper fails to find the corresponding output file / map file for this file because it has the following map:

MapIterator {
  'packages/debug/test/fixtures/es6/transpile.es6',
  'packages/debug/test/fixtures/coffee/transpile.coffee',
  'packages/debug/test/fixtures/sourcemapper/babel/in.js',
  'packages/debug/test/fixtures/sourcemapper/typescript/in.ts',
  'packages/debug/test/fixtures/sourcemapper/coffeescript/in.coffee' }

The test fails with:

  1) v8debugapi set and wait should be possible to set conditional breakpoints in coffeescript:
     Uncaught Error: Could not determine the output file associated with the transpiled input file
      at setErrorStatusAndCallback (packages/debug/src/agent/v8debugapi.js:557:17)
      at Object.set (packages/debug/src/agent/v8debugapi.js:125:18)
      at Context.<anonymous> (packages/debug/test/test-v8debugapi.js:984:13)

This is because test/fixtures/coffee/transpile.coffee does not exist in the map above exactly.

For non-transpiled files we are quite flexible in being to find the files even if the repo structure doesn't end up matching the deployed / under-debug version of the files. We need a similar treatment here.

Metadata

Metadata

Labels

🚨This issue needs some love.api: clouddebuggerIssues related to the googleapis/cloud-debug-nodejs API.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions