Open tslocke opened 2 years ago
The docs say the debugger has edit-and-continue, so in theory I could enter the expression right in the code and then select it to see the result, but in practice I find the debugger looses it's place when I do this.
That was the plan - make any place in your code a REPL when the debugger is on. The way it was designed is that the debugger during code editing should not change its place much (unless the changes are very significant). So we are keen to investigate why it's losing the position in your case. Can you please provide Wallaby Diagnostics report and an example of code/test where/when changing the code to output something is making the debugger to lose it's current step?
Some update: we have identified a couple of issues that may have been causing Wallaby debugger edit-and-continue stop working after syntactic errors introduced while typing an expression to evaluate (in Jest). The issues have been fixed and the fixes are published in the latest core v1.0.1263. Please try the latest core version to see if you spot any issues. If you still see any issues:
Can you please provide Wallaby Diagnostics report and an example of code/test where/when changing the code to output something is making the debugger to lose its current step?
Thanks for the update. I'm still seeing the issue.
In the case I just saw, the debugger jumped to a different line but in the same method. Would it be safe to assume the rest of the context (i.e. the stack) was preserved, and I can just step back to the line I wanted to be on?
Here's the info you asked for...
I was editing this method
appendTransaction(trs: Transaction[], _oldState: any, newState: EditorState) {
const [store, actions] = useStore()
trs = trs.filter(tr => tr.docChanged && !tr.getMeta('inio-ignore'))
if (trs.length > 0) {
const {tr, doc} = newState
let $page = ResolvedNode.page(doc)
const finalIDs = containedIDs(doc)
const deleteIDs = new Set<string>()
for (const id of deletedIDs(trs)) {
if (!finalIDs[id]) // <<<<<< 3. The debugger jumped back here
deleteIDs.add(id)
}
finalIDs//? // <<<<<< 2. This is the line I added
let newIDsFromDups = new Set<string>() // <<<<<< 1. This is was the current debugger step
for (const id of addedIDs(trs)) {
replaceDuplicateIDs(tr, $page, id, newIDsFromDups)
}
$page = ResolvedNode.page(tr.doc)
const newNodes = addMissingIDs(tr, $page, store.blocks, newIDsFromDups)
$page = ResolvedNode.page(tr.doc)
const changed = findChangedNodes($page)
if (newNodes.length > 0 || changed.length > 0) {
const editBlocks = mapToObject([...newNodes, ...changed], $n => {
const b = nodeToBlock($n, id => store.blocks[id])
return [b.id, b]
})
if (isPresent(deleteIDs) || isPresent(editBlocks)) {
if (isPresent(deleteIDs)) actions.stageDeletes(deleteIDs)
if (isPresent(editBlocks)) actions.stageEdits(editBlocks)
actions.commit()
}
return tr
}
}
}
})
Diagnostics:
{
editorVersion: '1.67.1',
pluginVersion: '1.0.337',
editorType: 'VSCode',
osVersion: 'darwin 21.4.0',
nodeVersion: 'v16.14.2',
coreVersion: '1.0.1266',
checksum: 'MDY1YTZlY2QyZTAzNjNiNDliMmViMDE1ODI2MDE1NjMsMTY4MjcyNjQwMDAwMCww',
config: {
resolveGetters: true,
diagnostics: {
jest: {
config: {
configs: [
{
automock: false,
cache: true,
cacheDirectory: '/private/var/folders/1g/4ply6jh94jjfg90j5ts90n_w0000gn/T/jest_dx',
clearMocks: false,
coveragePathIgnorePatterns: [ '/node_modules/' ],
cwd: '<homeDir>/Projects/Inio/inio/web',
dependencyExtractor: undefined,
detectLeaks: false,
detectOpenHandles: false,
displayName: undefined,
errorOnDeprecated: false,
extensionsToTreatAsEsm: [],
extraGlobals: [],
filter: undefined,
forceCoverageMatch: [],
globalSetup: undefined,
globalTeardown: undefined,
globals: {},
haste: { computeSha1: false, enableSymlinks: false, forceNodeFilesystemAPI: false, throwOnModuleCollision: false },
injectGlobals: true,
moduleDirectories: [ 'node_modules' ],
moduleFileExtensions: [ 'js', 'jsx', 'ts', 'tsx', 'json', 'node' ],
moduleLoader: undefined,
moduleNameMapper: [ [ '@/(.*)', [ '<homeDir>/Projects/Inio/inio/web/src/$1' ] ], [ '@shared/(.*)', [ '<homeDir>/Projects/Inio/inio/shared/src/$1' ] ] ],
modulePathIgnorePatterns: [],
modulePaths: undefined,
name: 'f889b487b2d77b15050b38cfe134743b',
prettierPath: 'prettier',
resetMocks: false,
resetModules: false,
resolver: '<homeDir>/Projects/Inio/inio/web/node_modules/solid-jest/preset/browser/resolver.js',
restoreMocks: false,
rootDir: '<homeDir>/Projects/Inio/inio/web',
roots: [ '<homeDir>/Projects/Inio/inio/web' ],
runner: '<homeDir>/Projects/Inio/inio/web/node_modules/jest-runner/build/index.js',
setupFiles: [],
setupFilesAfterEnv: [],
skipFilter: false,
skipNodeResolution: undefined,
slowTestThreshold: 5,
snapshotFormat: undefined,
snapshotResolver: undefined,
snapshotSerializers: [],
testEnvironment: '<homeDir>/Projects/Inio/inio/web/node_modules/jest-environment-jsdom/build/index.js',
testEnvironmentOptions: {},
testLocationInResults: false,
testMatch: [],
testPathIgnorePatterns: [ '/node_modules/' ],
testRegex: [ '(/tests/.*\\.(test|spec))\\.(jsx?|tsx?)$' ],
testRunner: '<homeDir>/Projects/Inio/inio/web/node_modules/jest-circus/runner.js',
testURL: 'http://localhost/',
timers: 'real',
transform: [
[ '\\.[jt]sx$', '<homeDir>/Projects/Inio/inio/web/node_modules/solid-jest/preset/browser/transform.js', {} ],
[ '\\.[jt]s$', '<homeDir>/Projects/Inio/inio/web/node_modules/babel-jest/build/index.js', {} ]
],
transformIgnorePatterns: [ 'node_modules/(?!solid-js.*|.*(?<=.[tj]sx))$' ],
unmockedModulePathPatterns: undefined,
watchPathIgnorePatterns: []
}
],
globalConfig: {
bail: 0,
changedFilesWithAncestor: false,
changedSince: undefined,
collectCoverage: false,
collectCoverageFrom: [],
collectCoverageOnlyFrom: undefined,
coverageDirectory: '<homeDir>/Projects/Inio/inio/web/coverage',
coverageProvider: 'babel',
coverageReporters: [ 'json', 'text', 'lcov', 'clover' ],
coverageThreshold: undefined,
detectLeaks: false,
detectOpenHandles: false,
errorOnDeprecated: false,
expand: false,
filter: undefined,
findRelatedTests: false,
forceExit: false,
globalSetup: undefined,
globalTeardown: undefined,
json: false,
lastCommit: false,
listTests: false,
logHeapUsage: false,
maxConcurrency: 5,
maxWorkers: 7,
noSCM: undefined,
noStackTrace: false,
nonFlagArgs: undefined,
notify: false,
notifyMode: 'failure-change',
onlyChanged: false,
onlyFailures: false,
outputFile: undefined,
passWithNoTests: false,
projects: [],
replname: undefined,
reporters: undefined,
rootDir: '<homeDir>/Projects/Inio/inio/web',
runTestsByPath: false,
silent: undefined,
skipFilter: false,
snapshotFormat: undefined,
testFailureExitCode: 1,
testNamePattern: undefined,
testPathPattern: '',
testResultsProcessor: undefined,
testSequencer: '<homeDir>/Projects/Inio/inio/web/node_modules/@jest/test-sequencer/build/index.js',
testTimeout: undefined,
updateSnapshot: 'new',
useStderr: false,
verbose: undefined,
watch: false,
watchAll: false,
watchPlugins: undefined,
watchman: true
},
hasDeprecationWarnings: false,
wallaby: {
roots: [],
watchPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/', '/private/var/folders/1g/4ply6jh94jjfg90j5ts90n_w0000gn/T/jest_dx', '\\./coverage' ],
testPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/', '/private/var/folders/1g/4ply6jh94jjfg90j5ts90n_w0000gn/T/jest_dx', '\\./coverage' ],
testMatch: [],
testRegex: [ '(/tests/.*\\.(test|spec))\\.(jsx?|tsx?)$' ]
}
}
}
},
filesWithCoverageCalculated: [],
filesWithNoCoverageCalculated: [],
globalSetup: false,
testFramework: { version: 'jest@24.8.0', configurator: 'jest@24.8.0', reporter: 'jest@24.8.0', starter: 'jest@24.8.0', autoDetected: true },
micromatch: true,
files: [
{ pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true },
{ pattern: '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\.\/git\/|\/\..+\//, ignore: true, trigger: true, load: true },
{
pattern: '/private/var/folders/1g/4ply6jh94jjfg90j5ts90n_w0000gn/T/jest_dx',
regexp: /\/private\/var\/folders\/1g\/4ply6jh94jjfg90j5ts90n_w0000gn\/T\/jest_dx/,
ignore: true,
trigger: true,
load: true
},
{ pattern: '\\./coverage', regexp: /\.\/coverage/, ignore: true, trigger: true, load: true },
{ pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
{ pattern: '(/tests/.*\\.(test|spec))\\.(jsx?|tsx?)$', regexp: /(\/tests\/.*\.(test|spec))\.(jsx?|tsx?)$/, ignore: true, trigger: true, load: true }
],
tests: [
{ pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true, test: true },
{
pattern: '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/',
regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\.\/git\/|\/\..+\//,
ignore: true,
trigger: true,
load: true,
test: true
},
{
pattern: '/private/var/folders/1g/4ply6jh94jjfg90j5ts90n_w0000gn/T/jest_dx',
regexp: /\/private\/var\/folders\/1g\/4ply6jh94jjfg90j5ts90n_w0000gn\/T\/jest_dx/,
ignore: true,
trigger: true,
load: true,
test: true
},
{ pattern: '\\./coverage', regexp: /\.\/coverage/, ignore: true, trigger: true, load: true, test: true },
{ pattern: '(/tests/.*\\.(test|spec))\\.(jsx?|tsx?)$', regexp: /(\/tests\/.*\.(test|spec))\.(jsx?|tsx?)$/, ignore: false, trigger: true, load: true, test: true, order: 2 }
],
runAllTestsInAffectedTestFile: false,
updateNoMoreThanOneSnapshotPerTestFileRun: false,
compilers: {},
preprocessors: {},
maxConsoleMessagesPerTest: 100,
autoConsoleLog: true,
delays: { run: 0, edit: 100, update: 0 },
workers: { initial: 0, regular: 0, recycle: false },
teardown: undefined,
hints: {
ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
commentAutoLog: '?',
testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
},
automaticTestFileSelection: true,
runSelectedTestsOnly: false,
mapConsoleMessagesStackTrace: false,
extensions: {},
env: {
type: 'node',
params: {},
runner: '<homeDir>/.fnm/node-versions/v16.14.2/installation/bin/node',
viewportSize: { width: 800, height: 600 },
options: { width: 800, height: 600 },
bundle: true
},
reportUnhandledPromises: true,
slowTestThreshold: 75,
lowCoverageThreshold: 80,
loose: true,
configCode: 'module.exports = function () {\n return {\n resolveGetters: true\n };\n};\n'
},
packageJSON: {
dependencies: {
'@headlessui/react': '^1.6.1',
'@tiptap/core': '^2.0.0-beta.138',
'@tiptap/starter-kit': '^2.0.0-beta.140',
'@tiptap/suggestion': '^2.0.0-beta.82',
arangojs: '^7.6.1',
axios: '^0.26.0',
'fractional-indexing': '^3.0.0',
fuzzy: '^0.1.3',
'hotkeys-js': '^3.8.7',
inflection: '^1.13.1',
mitt: '^3.0.0',
nanoid: '^3.3.1',
'next-tick': '^1.1.0',
'prosemirror-inputrules': '^1.1.3',
'pusher-js': '^7.0.6',
ramda: '^0.28',
react: '^18.1.0',
'react-dom': '^18.1.0',
replicache: '^9.0.0',
'solid-app-router': '^0.3.0',
'solid-js': '^1.3.7',
'tippy.js': '^6.3.7'
},
devDependencies: {
'@tailwindcss/forms': '^0.4',
'@tailwindcss/line-clamp': '^0.3',
'@tailwindcss/typography': '^0.5',
'@types/inflection': '^1.13.0',
'@types/jest': '^27.4.1',
'@types/nanoid': '^3.0.0',
'@types/next-tick': '^1.0.0',
'@types/node': '^17.0.21',
'@types/object-inspect': '^1.8.1',
'@types/prosemirror-inputrules': '^1.0.4',
'@types/prosemirror-test-builder': '^1.0.2',
'@types/ramda': '^0.27.48',
'@types/react': '^18.0.9',
'@types/react-dom': '^18.0.3',
autoprefixer: '^10.4.0',
jest: '^27.5.1',
'json-beautify': '^1.1.1',
'object-inspect': '^1.11.0',
postcss: '^8.3.11',
'solid-jest': '^0.2.0',
tailwindcss: '^3.0',
'ts-unused-exports': '^8.0.0',
'type-fest': '^2.12.0',
typescript: '^4.5.5',
vite: '^2.8.0',
'vite-plugin-solid': '^2.2.5',
'vite-tsconfig-paths': '^3.4.1'
}
},
fs: { numberOfFiles: 149 },
debug: [
'2022-05-16T09:16:02.476Z angular/cli config Angular CLI not found.\n',
'2022-05-16T09:16:02.607Z jest/config Detected Jest.\n',
'2022-05-16T09:16:02.607Z jest/config Configured Jest.\n',
'2022-05-16T09:16:02.608Z project Wallaby Node version: v16.14.2\n',
'2022-05-16T09:16:02.608Z project Wallaby config: <homeDir>/Projects/Inio/inio/web/wallaby.js\n',
'2022-05-16T09:16:02.646Z project File cache: <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.337/projects/b6c1129a40e7d527\n',
'2022-05-16T09:16:02.672Z uiService Listening port 51235\n',
'2022-05-16T09:16:02.680Z workers Parallelism for initial run: 6, for regular run: 3\n',
'2022-05-16T09:16:02.681Z workers Starting run worker instance #0\n',
'2022-05-16T09:16:02.681Z workers Starting run worker instance #1\n',
'2022-05-16T09:16:02.681Z workers Starting run worker instance #2\n',
'2022-05-16T09:16:02.681Z workers Starting run worker instance #3\n',
'2022-05-16T09:16:02.681Z workers Starting run worker instance #4\n',
'2022-05-16T09:16:02.681Z workers Starting run worker instance #5\n',
'2022-05-16T09:16:02.681Z workers Web server is listening at 64760\n',
'2022-05-16T09:16:02.698Z project Stopping process pool\n',
'2022-05-16T09:16:02.699Z project File cache is up-to-date, starting full test run\n',
'2022-05-16T09:16:02.701Z project Test run started; run priority: 3\n',
'2022-05-16T09:16:02.703Z project Running all tests\n',
'2022-05-16T09:16:02.707Z workers Starting test run, priority: 3\n',
'2022-05-16T09:16:02.707Z nodeRunner Starting sandbox [worker #0, session #m0psa]\n',
'2022-05-16T09:16:02.707Z nodeRunner Preparing sandbox [worker #0, session #m0psa]\n',
'2022-05-16T09:16:02.776Z workers Started run worker instance (delayed) #1\n',
'2022-05-16T09:16:02.776Z workers Started run worker instance (delayed) #0\n',
'2022-05-16T09:16:02.777Z nodeRunner Prepared sandbox [worker #0, session #m0psa]\n',
'2022-05-16T09:16:02.777Z workers [worker #0, session #m0psa] Running tests in sandbox\n',
'2022-05-16T09:16:02.777Z workers Started run worker instance (delayed) #2\n',
'2022-05-16T09:16:02.783Z workers Started run worker instance (delayed) #3\n',
'2022-05-16T09:16:02.788Z workers Started run worker instance (delayed) #5\n',
'2022-05-16T09:16:02.793Z workers Started run worker instance (delayed) #4\n',
'2022-05-16T09:16:11.013Z workers Scheduling Jest Test Run (m0psa): 2022-05-16T09:16:03.083Z\n',
'2022-05-16T09:16:11.013Z workers [m0psa] Loaded unknown number of test(s)\n',
'2022-05-16T09:16:11.016Z workers [m0psa] Test executed: enter then type after page heading should be good\n',
'2022-05-16T09:16:11.018Z workers [m0psa] Test executed: indent paragraph to create card\n',
'2022-05-16T09:16:11.018Z workers [m0psa] Test executed: outdent to unwrap a card\n',
'2022-05-16T09:16:11.019Z workers [m0psa] Test executed: backspace at start of card\n',
'2022-05-16T09:16:11.019Z workers [m0psa] Test executed: delete just before start of card\n',
'2022-05-16T09:16:11.019Z workers [m0psa] Test executed: enter at start of card\n',
'2022-05-16T09:16:11.020Z workers [m0psa] Test executed: backspace at start of para following card\n',
'2022-05-16T09:16:11.020Z workers [m0psa] Test executed: delete at very end of card followed by para\n',
'2022-05-16T09:16:11.020Z workers [m0psa] Test executed: indent a card to make it a sub-card\n',
'2022-05-16T09:16:11.020Z workers [m0psa] Test executed: cannot double indent a sub-card\n',
'2022-05-16T09:16:11.020Z workers [m0psa] Test executed: outdent a sub-card\n',
'2022-05-16T09:16:11.020Z workers [m0psa] Test executed: indent blank paragraph to create card\n',
'2022-05-16T09:16:11.021Z workers [m0psa] Test executed: backspace sigil to convert page to card\n',
'2022-05-16T09:16:11.025Z workers [m0psa] Run 13 test(s), skipped 0 test(s)\n',
'2022-05-16T09:16:11.026Z workers Jest Test Run Complete (m0psa): 2022-05-16T09:16:11.011Z\n',
'2022-05-16T09:16:11.026Z workers [m0psa] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:11.026Z project Test run finished\n',
'2022-05-16T09:16:11.027Z project Processed console.log entries\n',
'2022-05-16T09:16:11.027Z project Processed loading sequences\n',
'2022-05-16T09:16:11.027Z project Processed executed tests\n',
'2022-05-16T09:16:11.034Z project Processed code coverage\n',
'2022-05-16T09:16:11.072Z project Test run result processed and sent to IDE\n',
'2022-05-16T09:16:15.036Z project Requested to run some tests\n',
'2022-05-16T09:16:15.036Z project Debugger start test run\n',
'2022-05-16T09:16:15.036Z project Test run started; run priority: 1\n',
'2022-05-16T09:16:15.037Z testTask Test files from affected: 0, from deleted or manually requested: 1, from recently changed: 0, from loaded by: 0, from failing: 0\n',
'2022-05-16T09:16:15.037Z testTask Running only selected or not excluded tests\n',
'2022-05-16T09:16:15.038Z workers Starting test run, priority: 1\n',
'2022-05-16T09:16:15.038Z nodeRunner Starting sandbox [worker #0, session #v0jo9]\n',
'2022-05-16T09:16:15.038Z nodeRunner Preparing sandbox [worker #0, session #v0jo9]\n',
'2022-05-16T09:16:15.038Z nodeRunner Prepared sandbox [worker #0, session #v0jo9]\n',
'2022-05-16T09:16:15.038Z workers [worker #0, session #v0jo9] Running tests in sandbox\n',
'2022-05-16T09:16:16.181Z workers Scheduling Jest Test Run (v0jo9): 2022-05-16T09:16:15.041Z\n',
'2022-05-16T09:16:16.181Z workers [v0jo9] Loaded unknown number of test(s)\n',
'2022-05-16T09:16:16.189Z workers [v0jo9] Test executed: enter then type after page heading should be good\n',
'2022-05-16T09:16:16.209Z workers [v0jo9] Run 1 test(s), skipped 0 test(s)\n',
'2022-05-16T09:16:16.209Z workers Jest Test Run Complete (v0jo9): 2022-05-16T09:16:16.180Z\n',
'2022-05-16T09:16:16.209Z workers [v0jo9] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:16.210Z project Test run finished\n',
'2022-05-16T09:16:16.210Z project Processed console.log entries\n',
'2022-05-16T09:16:16.210Z project Processed loading sequences\n',
'2022-05-16T09:16:16.210Z project Processed executed tests\n',
'2022-05-16T09:16:16.213Z project Processed code coverage\n',
'2022-05-16T09:16:16.217Z project Processed code trace\n',
'2022-05-16T09:16:16.261Z project Test run result processed and sent to IDE\n',
'2022-05-16T09:16:32.095Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:32.095Z extended-core New file or complex file change\n',
'2022-05-16T09:16:32.101Z project Test run started; run priority: 2\n',
'2022-05-16T09:16:32.101Z testTask Running only selected or not excluded tests\n',
'2022-05-16T09:16:32.103Z workers Starting test run, priority: 2\n',
'2022-05-16T09:16:32.103Z nodeRunner Starting sandbox [worker #0, session #115s6]\n',
'2022-05-16T09:16:32.103Z nodeRunner Preparing sandbox [worker #0, session #115s6]\n',
'2022-05-16T09:16:32.103Z nodeRunner Prepared sandbox [worker #0, session #115s6]\n',
'2022-05-16T09:16:32.103Z workers [worker #0, session #115s6] Running tests in sandbox\n',
'2022-05-16T09:16:32.567Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:32.568Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:32.568Z project Test run was cancelled\n',
'2022-05-16T09:16:32.738Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:32.739Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:32.739Z project Test run was cancelled\n',
'2022-05-16T09:16:32.860Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:32.861Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:32.861Z project Test run was cancelled\n',
'2022-05-16T09:16:33.059Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:33.059Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:33.059Z project Test run was cancelled\n',
'2022-05-16T09:16:33.194Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:33.195Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:33.195Z project Test run was cancelled\n',
'2022-05-16T09:16:33.485Z workers Scheduling Jest Test Run (115s6): 2022-05-16T09:16:32.106Z\n',
'2022-05-16T09:16:33.524Z workers Jest Test Run Complete (115s6): 2022-05-16T09:16:33.484Z\n',
'2022-05-16T09:16:33.525Z workers [115s6] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:33.525Z project Test run cancelled, re-queueing run data\n',
'2022-05-16T09:16:33.525Z project Test run finished\n',
'2022-05-16T09:16:33.526Z project Test run data re-queued\n',
'2022-05-16T09:16:33.555Z project Test run started; run priority: 2\n',
'2022-05-16T09:16:33.556Z testTask Running only selected or not excluded tests\n',
'2022-05-16T09:16:33.558Z workers Starting test run, priority: 2\n',
'2022-05-16T09:16:33.558Z nodeRunner Starting sandbox [worker #0, session #73nfy]\n',
'2022-05-16T09:16:33.558Z nodeRunner Preparing sandbox [worker #0, session #73nfy]\n',
'2022-05-16T09:16:33.558Z nodeRunner Prepared sandbox [worker #0, session #73nfy]\n',
'2022-05-16T09:16:33.558Z workers [worker #0, session #73nfy] Running tests in sandbox\n',
'2022-05-16T09:16:33.880Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:33.880Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:33.880Z project Test run was cancelled\n',
'2022-05-16T09:16:34.247Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:34.247Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:34.247Z project Test run was cancelled\n',
'2022-05-16T09:16:34.696Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:34.696Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:34.696Z project Test run was cancelled\n',
'2022-05-16T09:16:34.862Z workers Scheduling Jest Test Run (73nfy): 2022-05-16T09:16:33.562Z\n',
'2022-05-16T09:16:34.878Z workers Jest Test Run Complete (73nfy): 2022-05-16T09:16:34.861Z\n',
'2022-05-16T09:16:34.878Z workers [73nfy] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:34.878Z project Test run cancelled, re-queueing run data\n',
'2022-05-16T09:16:34.878Z project Test run finished\n',
'2022-05-16T09:16:34.878Z project Test run data re-queued\n',
'2022-05-16T09:16:34.902Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:34.904Z project Test run started; run priority: 2\n',
'2022-05-16T09:16:34.904Z testTask Running only selected or not excluded tests\n',
'2022-05-16T09:16:34.905Z workers Starting test run, priority: 2\n',
'2022-05-16T09:16:34.905Z nodeRunner Starting sandbox [worker #0, session #p2y67]\n',
'2022-05-16T09:16:34.905Z nodeRunner Preparing sandbox [worker #0, session #p2y67]\n',
'2022-05-16T09:16:34.905Z nodeRunner Prepared sandbox [worker #0, session #p2y67]\n',
'2022-05-16T09:16:34.905Z workers [worker #0, session #p2y67] Running tests in sandbox\n',
'2022-05-16T09:16:35.042Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:35.042Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:35.042Z project Test run was cancelled\n',
'2022-05-16T09:16:35.255Z fs File changed in editor: src/text_editor/plugins/store-nodes.ts\n',
'2022-05-16T09:16:35.255Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
'2022-05-16T09:16:35.255Z project Test run was cancelled\n',
'2022-05-16T09:16:36.168Z workers Scheduling Jest Test Run (p2y67): 2022-05-16T09:16:34.906Z\n',
'2022-05-16T09:16:36.191Z workers Jest Test Run Complete (p2y67): 2022-05-16T09:16:36.168Z\n',
'2022-05-16T09:16:36.191Z workers [p2y67] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:36.191Z project Test run cancelled, re-queueing run data\n',
'2022-05-16T09:16:36.191Z project Test run finished\n',
'2022-05-16T09:16:36.191Z project Test run data re-queued\n',
'2022-05-16T09:16:36.220Z project Test run started; run priority: 2\n',
'2022-05-16T09:16:36.220Z testTask Running only selected or not excluded tests\n',
'2022-05-16T09:16:36.220Z workers Starting test run, priority: 2\n',
'2022-05-16T09:16:36.220Z nodeRunner Starting sandbox [worker #0, session #772gz]\n',
'2022-05-16T09:16:36.220Z nodeRunner Preparing sandbox [worker #0, session #772gz]\n',
'2022-05-16T09:16:36.220Z nodeRunner Prepared sandbox [worker #0, session #772gz]\n',
'2022-05-16T09:16:36.221Z workers [worker #0, session #772gz] Running tests in sandbox\n',
'2022-05-16T09:16:37.437Z workers Scheduling Jest Test Run (772gz): 2022-05-16T09:16:36.222Z\n',
'2022-05-16T09:16:37.448Z workers [772gz] Loaded unknown number of test(s)\n',
'2022-05-16T09:16:37.456Z workers [772gz] Test executed: enter then type after page heading should be good\n',
'2022-05-16T09:16:37.462Z workers [772gz] Run 1 test(s), skipped 0 test(s)\n',
'2022-05-16T09:16:37.462Z workers Jest Test Run Complete (772gz): 2022-05-16T09:16:37.437Z\n',
'2022-05-16T09:16:37.462Z workers [772gz] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:37.462Z project Test run finished\n',
'2022-05-16T09:16:37.463Z project Processed console.log entries\n',
'2022-05-16T09:16:37.463Z project Processed loading sequences\n',
'2022-05-16T09:16:37.463Z project Processed executed tests\n',
'2022-05-16T09:16:37.466Z project Processed code coverage\n',
'2022-05-16T09:16:37.469Z project Processed code trace\n',
'2022-05-16T09:16:37.496Z project Test run result processed and sent to IDE\n',
'2022-05-16T09:16:40.075Z project Debugger stopped\n',
'2022-05-16T09:16:40.076Z project Test run started; run priority: 2\n',
'2022-05-16T09:16:40.076Z testTask Test files from affected: 1, from deleted or manually requested: 0, from recently changed: 0, from loaded by: 0, from failing: 1\n',
'2022-05-16T09:16:40.076Z testTask Running only selected or not excluded tests\n',
'2022-05-16T09:16:40.078Z workers Starting test run, priority: 2\n',
'2022-05-16T09:16:40.078Z nodeRunner Starting sandbox [worker #0, session #o1ffj]\n',
'2022-05-16T09:16:40.078Z nodeRunner Preparing sandbox [worker #0, session #o1ffj]\n',
'2022-05-16T09:16:40.078Z nodeRunner Prepared sandbox [worker #0, session #o1ffj]\n',
'2022-05-16T09:16:40.079Z workers [worker #0, session #o1ffj] Running tests in sandbox\n',
'2022-05-16T09:16:41.257Z workers Scheduling Jest Test Run (o1ffj): 2022-05-16T09:16:40.082Z\n',
'2022-05-16T09:16:41.258Z workers [o1ffj] Loaded unknown number of test(s)\n',
'2022-05-16T09:16:41.260Z workers [o1ffj] Test executed: enter then type after page heading should be good\n',
'2022-05-16T09:16:41.260Z workers [o1ffj] Test executed: indent paragraph to create card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: outdent to unwrap a card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: backspace at start of card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: delete just before start of card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: enter at start of card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: backspace at start of para following card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: delete at very end of card followed by para\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: indent a card to make it a sub-card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: cannot double indent a sub-card\n',
'2022-05-16T09:16:41.261Z workers [o1ffj] Test executed: outdent a sub-card\n',
'2022-05-16T09:16:41.262Z workers [o1ffj] Test executed: indent blank paragraph to create card\n',
'2022-05-16T09:16:41.262Z workers [o1ffj] Test executed: backspace sigil to convert page to card\n',
'2022-05-16T09:16:41.269Z workers [o1ffj] Run 13 test(s), skipped 0 test(s)\n',
'2022-05-16T09:16:41.269Z workers Jest Test Run Complete (o1ffj): 2022-05-16T09:16:41.257Z\n',
'2022-05-16T09:16:41.270Z workers [o1ffj] Sandbox is responsive, closing it\n',
'2022-05-16T09:16:41.270Z project Test run finished\n',
'2022-05-16T09:16:41.270Z project Processed console.log entries\n',
'2022-05-16T09:16:41.270Z project Processed loading sequences\n',
'2022-05-16T09:16:41.270Z project Processed executed tests\n',
'2022-05-16T09:16:41.272Z project Processed code coverage\n',
'2022-05-16T09:16:41.289Z project Test run result processed and sent to IDE\n'
]
}
p.s. I just realised I could have just selected 'finalIDs' to see the info I wanted - forgetting how the debugger works! Anyway hopefully this is a useful test case
Thanks for providing the sample, we'll investigate it.
Would it be safe to assume the rest of the context (i.e. the stack) was preserved, and I can just step back to the line I wanted to be on?
Yes, even if debugger jumps as a result of any changes, it should always be possible to simply step back/forward to the line you want to be on.
We have investigated a bit and depending on how exactly you've been editing your code to add the finalIDs//?
line, it may be possible for the debugger to shift the current line a bit (within 1-2 executed statements around the line that's being edited).
For example, if it was a simple paste, then no shift at all is likely to happen:
If the line was created by typing (with possible syntactic/runtime errors introduced and fixed), then minor shifts are expected. For example, while typing finalIDs
, it's likely that Wallaby ran the changed code while the variable name wasn't fully typed, so the debugger can only execute the code up to that line and stop (because of the runtime error caused by the unknown variable introduced as a result of typing). A similar effect may happen during any syntactic errors introduced and quickly fixed when typing.
While it's trivial to move the debugger back to where it was (or where you want it to be) after typing and any effects introduced by it, we can see how some separate input/REPL where you could evaluate stuff in the current debugger context may be useful as well. So I'll mark the issue as feature request (as you've been suggesting originally).
In the time-travel debugger, it's east to inspect simple values, but with more complex values I often find myself wanting to call methods (e.g.
.toJSON()
) to see what's going on more clearly. Is there any place like a REPL where I could do this in the current debugger context?The docs say the debugger has edit-and-continue, so in theory I could enter the expression right in the code and then select it to see the result, but in practice I find the debugger looses it's place when I do this.
Most of the time I don't need this - it's enough to focus on a test and inspect values without stepping through, but when you're in some code that gets called a bunch of times in the same test run it gets tricky.