-
Notifications
You must be signed in to change notification settings - Fork 51
fix: line numbers don't change in transpiled files #436
fix: line numbers don't change in transpiled files #436
Conversation
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I don't really understand how debug agent works, but why are we dealing with both .ts
files and .js
files?
src/agent/v8/inspector-debugapi.ts
Outdated
@@ -466,7 +466,8 @@ export class InspectorDebugApi implements debugapi.DebugApi { | |||
const captured = state.capture( | |||
callFrames, breakpoint, this.config, this.scriptMapper, | |||
this.v8Inspector); | |||
if (breakpoint.location) { | |||
if (breakpoint.location && | |||
breakpoint.location.path.toLowerCase().endsWith('.js')) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -218,7 +221,8 @@ describeFn('debugapi selection on Node >=10', () => { | |||
describe('v8debugapi', () => { | |||
const config: ResolvedDebugAgentConfig = extend( | |||
{}, defaultConfig, {workingDirectory: __dirname, forceNewAgent_: true}); | |||
// TODO(dominickramer): It appears `logLevel` is a typo and should be `level`. However, | |||
// TODO(dominickramer): It appears `logLevel` is a typo and should be `level`. | |||
// However, | |||
// with this change, the tests fail. Resolve this. | |||
const logger = | |||
new common.logger({levelLevel: config.logLevel} as {} as LoggerOptions); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-v8debugapi.ts
Outdated
@@ -685,6 +690,30 @@ describe('v8debugapi', () => { | |||
}); | |||
}); | |||
|
|||
it.only( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@jinwoo Both |
src/agent/v8/inspector-debugapi.ts
Outdated
@@ -466,7 +466,8 @@ export class InspectorDebugApi implements debugapi.DebugApi { | |||
const captured = state.capture( | |||
callFrames, breakpoint, this.config, this.scriptMapper, | |||
this.v8Inspector); | |||
if (breakpoint.location) { | |||
if (breakpoint.location && | |||
path.extname(breakpoint.location.path).toLowerCase() === '.js') { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@DominicKramer I understand that |
test/test-v8debugapi.ts
Outdated
@@ -685,6 +690,29 @@ describe('v8debugapi', () => { | |||
}); | |||
}); | |||
|
|||
it.only('should not change line number when breakpoints hit for transpiled files', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
…r/cloud-debug-nodejs into fix/417-line-number-changes
Fixes: #417