Skip to content

Commit

Permalink
feat: support custom scope types from cdp
Browse files Browse the repository at this point in the history
Fixes: #651
  • Loading branch information
connor4312 committed Jul 31, 2020
1 parent c5e0565 commit c974315
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/adapter/stackTrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import * as nls from 'vscode-nls';
import Cdp from '../cdp/api';
import Dap from '../dap/api';
import { asyncScopesNotAvailable } from '../dap/errors';
import { ProtocolError } from '../dap/protocolError';
import { LogPointCompiler } from './breakpoints/conditions/logPoint';
import { shouldSmartStepStackFrame } from './smartStepping';
import { IPreferredUiLocation } from './sources';
import { RawLocation, Thread } from './threads';
import { IExtraProperty, IScopeRef } from './variables';
import { LogPointCompiler } from './breakpoints/conditions/logPoint';
import { asyncScopesNotAvailable } from '../dap/errors';
import { ProtocolError } from '../dap/protocolError';

const localize = nls.loadMessageBundle();

Expand Down Expand Up @@ -229,6 +229,10 @@ export class StackFrame {
case 'module':
name = localize('scope.module', 'Module');
break;
default:
// fallback for custom scope types from other runtimes (#651)
name = scope.type.substr(0, 1).toUpperCase() + scope.type.substr(1);
break;
}
if (scope.name && scope.type === 'closure') {
name = localize('scope.closureNamed', 'Closure ({0})', scope.name);
Expand Down

0 comments on commit c974315

Please sign in to comment.