Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'id' of undefined #641

Closed
ricardopieper opened this issue Feb 10, 2022 · 5 comments
Closed

Cannot read property 'id' of undefined #641

ricardopieper opened this issue Feb 10, 2022 · 5 comments

Comments

@ricardopieper
Copy link

ricardopieper commented Feb 10, 2022

OS: Windows 11 Pro 21H2 build 22000.493
VSCode version: 1.64.1
CodeLLDB version: 1.16.10
Compiler: rustc 1.60.0-nightly (0c292c966 2022-02-08) (happens on 1.56 as well)
Debuggee: Windows executable (nightly-x86_64-pc-windows-msvc)

When I hit the green play button, the executable runs but the breakpoints are not hit. It started happening yesterday.

In the developer tools console, I see an error:

TypeError: Cannot read property 'id' of undefined
	at t.ModuleTreeDataProvider.onChangedActiveDebugSession (c:\Users\ricar\.vscode\extensions\vadimcn.vscode-lldb-1.6.10\extension.js:1:35266)

I believe this error happens in this function: https://github.com/vadimcn/vscode-lldb/blob/6e9d5e5ea940aae1dde4388b2fd0ca8901c810f4/extension/modulesView.ts#L88

Unfortunately I failed to debug the extension myself, so I can't check any further.
I tried installing a slightly older version of vscode (1.63) but it still happens.

I can't recall if I changed something in my system to cause this.

Extension crash
mainThreadExtensionService.ts:64 TypeError: Cannot read property 'id' of undefined
	at t.ModuleTreeDataProvider.onChangedActiveDebugSession (c:\Users\ricar\.vscode\extensions\vadimcn.vscode-lldb-1.6.10\extension.js:1:35266)
	at l.fire (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:64:1732)
	at R.$acceptDebugSessionActiveChanged (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:98:35975)
	at i._doInvokeHandler (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:97:13801)
	at i._invokeHandler (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:97:13485)
	at i._receiveRequest (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:97:12147)
	at i._receiveOneMessage (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:97:11024)
	at c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:97:8934
	at l.fire (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:64:1712)
	at s.fire (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:72:19002)
	at c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:112:34390
	at l.fire (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:64:1712)
	at s.fire (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:72:19002)
	at a._receiveMessage (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:72:23583)
	at c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:72:21117
	at l.fire (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:64:1712)
	at _.acceptChunk (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:72:15833)
	at c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:72:14963
	at Socket.A (c:\Users\ricar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:112:13838)
	at Socket.emit (events.js:315:20)
	at addChunk (internal/streams/readable.js:309:12)
	at readableAddChunk (internal/streams/readable.js:284:9)
	at Socket.Readable.push (internal/streams/readable.js:223:10)
	at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
Verbose log
 Running `cargo build --bin=pony --package=pony --message-format=json`...
warning: unused import: `std::env`
 --> src\semantic\mir_printer.rs:1:5
  |
1 | use std::env;
  |     ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: std::fs
--> src\semantic\mir_printer.rs:2:5
|
2 | use std::fs;
| ^^^^^^^

warning: unused import: crate::ast::parser
--> src\semantic\mir_printer.rs:4:5
|
4 | use crate::ast::parser;
| ^^^^^^^^^^^^^^^^^^

warning: unused import: crate::semantic::mir
--> src\semantic\mir_printer.rs:5:5
|
5 | use crate::semantic::mir;
| ^^^^^^^^^^^^^^^^^^^^

warning: unused imports: HashMap, HashSet, any::Any
--> src\semantic\type_db.rs:6:5
|
6 | any::Any,
| ^^^^^^^^
7 | collections::{HashMap, HashSet},
| ^^^^^^^ ^^^^^^^

warning: unused import: crate::semantic::mir
--> src\main.rs:12:5
|
12 | use crate::semantic::mir;
| ^^^^^^^^^^^^^^^^^^^^

warning: unused import: crate::semantic::mir::*
--> src\main.rs:13:5
|
13 | use crate::semantic::mir::*;
| ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: crate::semantic::type_db::TypeDatabase
--> src\main.rs:14:5
|
14 | use crate::semantic::type_db::TypeDatabase;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused variable: function_name
--> src\semantic\first_assignments.rs:6:51
|
6 | fn make_assignments_into_declarations_in_function(function_name: &str,
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _function_name
|
= note: #[warn(unused_variables)] on by default

warning: unused variable: return_type
--> src\semantic\first_assignments.rs:9:5
|
9 | return_type: &MIRTypeDef) -> Vec {
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _return_type

warning: unused variable: typedef
--> src\semantic\undeclared_vars.rs:46:23
|
46 | MIRExpr::Cast(typedef, expr) => {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: _typedef

warning: unused variable: path
--> src\semantic\undeclared_vars.rs:74:27
|
74 | MIR::Assign { path, expression } => {
| ^^^^ help: try ignoring the field: path: _

warning: unused variable: return_type
--> src\semantic\undeclared_vars.rs:57:5
|
57 | return_type: &MIRTypeDef,
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _return_type

warning: unused variable: result
--> src\semantic\undeclared_vars.rs:109:13
|
109 | let result = match node {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: _result

warning: unused variable: result
--> src\semantic\undeclared_vars.rs:119:13
|
119 | let result = match node {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: _result

warning: unused variable: type_db
--> src\semantic\name_registry.rs:36:28
|
36 | pub fn build_name_registry(type_db: &TypeDatabase, mir: &[MIR]) -> NameRegistry {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: _type_db

warning: unused variable: function_name
--> src\semantic\typing.rs:367:5
|
367 | function_name: &str, parameters: &[MIRTypedBoundName], body: &[MIR]) -> Vec {
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _function_name
|
= note: #[warn(unused_variables)] on by default

warning: unused variable: globals
--> src\semantic\typing.rs:470:20
|
470 | pub fn check_types(globals: &NameRegistry, type_db: &TypeDatabase, mir: Vec) {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: _globals

warning: unused variable: type_db
--> src\semantic\typing.rs:470:44
|
470 | pub fn check_types(globals: &NameRegistry, type_db: &TypeDatabase, mir: Vec) {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: _type_db

warning: unused variable: mir
--> src\semantic\typing.rs:470:68
|
470 | pub fn check_types(globals: &NameRegistry, type_db: &TypeDatabase, mir: Vec) {
| ^^^ help: if this is intentional, prefix it with an underscore: _mir

warning: unused variable: lhs
--> src\semantic\mir.rs:216:27
|
216 | Expr::IndexAccess(lhs, index_expr) => {
| ^^^ help: if this is intentional, prefix it with an underscore: _lhs

warning: unused variable: index_expr
--> src\semantic\mir.rs:216:32
|
216 | Expr::IndexAccess(lhs, index_expr) => {
| ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _index_expr

warning: variant is never constructed: TypeBoundMissingTypeSpecifier
--> src\ast\parser.rs:143:5
|
143 | TypeBoundMissingTypeSpecifier,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
note: ParsingError has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis
--> src\ast\parser.rs:140:10
|
140 | #[derive(Debug, Clone)]
| ^^^^^ ^^^^^
= note: this warning originates in the derive macro Debug (in Nightly builds, run with -Z macro-backtrace for more info)

warning: function is never used: resolve_function_signature
--> src\semantic\typing.rs:150:4
|
150 | fn resolve_function_signature(type_db: &TypeDatabase, signature: FunctionSignature, generics: &[TypeInstance]) -> (Vec, Typ...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default

warning: function is never used: check_types
--> src\semantic\typing.rs:470:8
|
470 | pub fn check_types(globals: &NameRegistry, type_db: &TypeDatabase, mir: Vec) {
| ^^^^^^^^^^^

warning: variant is never constructed: Function
--> src\semantic\type_db.rs:27:5
|
27 | Function(Vec, Box), //on functions, both return or args can use generics
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: Type has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis
--> src\semantic\type_db.rs:23:10
|
23 | #[derive(Debug, Clone, PartialEq, Eq)]
| ^^^^^ ^^^^^
= note: this warning originates in the derive macro Debug (in Nightly builds, run with -Z macro-backtrace for more info)

warning: variant is never constructed: Cast
--> src\semantic\mir.rs:30:5
|
30 | Cast(MIRTypeDef, TrivialMIRExpr),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: MIRExpr has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis
--> src\semantic\mir.rs:27:10
|
27 | #[derive(Debug, Clone, PartialEq, Eq)]
| ^^^^^ ^^^^^
= note: this warning originates in the derive macro Debug (in Nightly builds, run with -Z macro-backtrace for more info)

warning: 27 warnings emitted

Finished dev [unoptimized + debuginfo] target(s) in 0.02s

Raw artifacts:
{
fileName: 'c:\Users\ricar\pony-lang\target\debug\pony.exe',
name: 'pony',
kind: 'bin'
}
Filtered artifacts:
{
fileName: 'c:\Users\ricar\pony-lang\target\debug\pony.exe',
name: 'pony',
kind: 'bin'
}
configuration: {
type: 'lldb',
request: 'launch',
name: "Debug executable 'pony'",
args: [ 'example.py' ],
cwd: '${workspaceFolder}',
__configurationTarget: 5,
relativePathBase: 'c:\Users\ricar\pony-lang',
program: 'c:\Users\ricar\pony-lang\target\debug\pony.exe',
sourceLanguages: [ 'rust' ]
}
liblldb: c:\Users\ricar.vscode\extensions\vadimcn.vscode-lldb-1.6.10\lldb\bin\liblldb.dll
environment: {}
params: {
evaluateForHovers: true,
commandCompletions: true,
sourceLanguages: [ 'rust' ]
}
Listening on port 56125
[2022-02-10T17:48:37.962Z DEBUG codelldb] New debug session
INFO(Python) 14:48:38 formatters: Initializing
INFO(Python) 14:48:38 formatters.rust: Initializing
[2022-02-10T17:48:38.198Z DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
[2022-02-10T17:48:38.199Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"exceptionBreakpointFilters":[{"default":true,"filter":"rust_panic","label":"Rust: on panic"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true}}
[2022-02-10T17:48:38.206Z DEBUG codelldb::dap_codec] --> {"command":"launch","arguments":{"type":"lldb","request":"launch","name":"Debug executable 'pony'","args":["example.py"],"cwd":"C:\Users\ricar\pony-lang","__configurationTarget":5,"relativePathBase":"c:\Users\ricar\pony-lang","program":"c:\Users\ricar\pony-lang\target\debug\pony.exe","sourceLanguages":["rust"],"_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"3b4a91ae-0d87-4ce0-a1ad-c3e82f62c3ec"},"type":"request","seq":2}
[2022-02-10T17:48:38.206Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":1,"event":"capabilities","body":{"capabilities":{"exceptionBreakpointFilters":[{"default":true,"filter":"rust_panic","label":"Rust: on panic"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true}}}
[2022-02-10T17:48:38.247Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":2,"event":"initialized"}
[2022-02-10T17:48:38.247Z DEBUG codelldb::debug_session] Debug event: 000001AF34C96130 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {pony.exe}
[2022-02-10T17:48:38.247Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":3,"event":"module","body":{"module":{"addressRange":"FFFFFFFFFFFFFFFF","id":"FFFFFFFFFFFFFFFF","name":"pony.exe","path":"c:\Users\ricar\pony-lang\target\debug\pony.exe","symbolFilePath":"c:\Users\ricar\pony-lang\target\debug\pony.exe","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.248Z DEBUG codelldb::dap_codec] <-- {"type":"request","seq":4,"command":"runInTerminal","arguments":{"args":["c:\Users\ricar\.vscode\extensions\vadimcn.vscode-lldb-1.6.10\adapter\codelldb.exe","terminal-agent","--port=56127"],"cwd":"","kind":"integrated","title":"Debug executable 'pony'"}}
[2022-02-10T17:48:38.259Z DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"main.rs","path":"c:\Users\ricar\pony-lang\src\main.rs"},"lines":[17],"breakpoints":[{"line":17}],"sourceModified":false},"type":"request","seq":3}
[2022-02-10T17:48:38.266Z DEBUG codelldb::debug_session] Debug event: 000001AF34B85180 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {}
[2022-02-10T17:48:38.266Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":3,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"message":"Resolved locations: 0","verified":false}]}}
[2022-02-10T17:48:38.279Z DEBUG codelldb::dap_codec] --> {"type":"response","seq":4,"command":"runInTerminal","request_seq":4,"success":true,"body":{"shellProcessId":15080}}
[2022-02-10T17:48:38.284Z DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5}
[2022-02-10T17:48:38.284Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":5,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
[2022-02-10T17:48:38.292Z DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6}
[2022-02-10T17:48:38.292Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":6,"success":true,"command":"setDataBreakpoints","body":{"breakpoints":[]}}
[2022-02-10T17:48:38.303Z DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":["rust_panic"]},"type":"request","seq":7}
[2022-02-10T17:48:38.351Z DEBUG codelldb::debug_session] Debug event: 000001AF34B85500 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {}
[2022-02-10T17:48:38.351Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":7,"success":true,"command":"setExceptionBreakpoints"}
[2022-02-10T17:48:38.363Z DEBUG codelldb::dap_codec] --> {"command":"configurationDone","type":"request","seq":8}
[2022-02-10T17:48:38.364Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":5,"event":"output","body":{"output":"Launching: c:\Users\ricar\pony-lang\target\debug\pony.exe example.py\n"}}
[adapter\src\terminal.rs:104] FreeConsole() = 1
[adapter\src\terminal.rs:105] AttachConsole(pid) = 1
[adapter\src\terminal.rs:109] FreeConsole() = 1
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":6,"event":"output","body":{"output":"Launched process 14368\n"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":2,"success":true,"command":"launch"}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA7A00 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA7640 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {pony.exe}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":7,"event":"breakpoint","body":{"breakpoint":{"id":2,"message":"Resolved locations: 1","verified":true},"reason":"changed"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA8180 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {ntdll.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":8,"event":"module","body":{"module":{"addressRange":"7FF7B3FA0000","id":"7FF7B3FA0000","name":"pony.exe","path":"c:\Users\ricar\pony-lang\target\debug\pony.exe","symbolFilePath":"c:\Users\ricar\pony-lang\target\debug\pony.exe","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA8900 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {ntdll.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":8,"success":true,"command":"configurationDone"}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA89C0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel32.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":9,"event":"module","body":{"module":{"addressRange":"7FF9E5A00000","id":"7FF9E5A00000","name":"ntdll.dll","path":"C:\Windows\System32\ntdll.dll","symbolFilePath":"C:\Windows\System32\ntdll.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":10,"event":"module","body":{"module":{"addressRange":"7FF9E5A00000","id":"7FF9E5A00000","name":"ntdll.dll","path":"C:\Windows\System32\ntdll.dll","symbolFilePath":"C:\Windows\System32\ntdll.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA88C0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel32.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":11,"event":"module","body":{"module":{"addressRange":"7FF9E4C20000","id":"7FF9E4C20000","name":"kernel32.dll","path":"C:\Windows\System32\kernel32.dll","symbolFilePath":"C:\Windows\System32\kernel32.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA8A00 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {KernelBase.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":12,"event":"module","body":{"module":{"addressRange":"7FF9E4C20000","id":"7FF9E4C20000","name":"kernel32.dll","path":"C:\Windows\System32\kernel32.dll","symbolFilePath":"C:\Windows\System32\kernel32.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":13,"event":"module","body":{"module":{"addressRange":"7FF9E3430000","id":"7FF9E3430000","name":"KernelBase.dll","path":"C:\Windows\System32\KernelBase.dll","symbolFilePath":"C:\Windows\System32\KernelBase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA8E00 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {KernelBase.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA8140 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {ucrtbase.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":14,"event":"module","body":{"module":{"addressRange":"7FF9E3430000","id":"7FF9E3430000","name":"KernelBase.dll","path":"C:\Windows\System32\KernelBase.dll","symbolFilePath":"C:\Windows\System32\KernelBase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA9A80 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {ucrtbase.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":15,"event":"module","body":{"module":{"addressRange":"7FF9E3040000","id":"7FF9E3040000","name":"ucrtbase.dll","path":"C:\Windows\System32\ucrtbase.dll","symbolFilePath":"C:\Windows\System32\ucrtbase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA9500 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {bcrypt.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":16,"event":"module","body":{"module":{"addressRange":"7FF9E3040000","id":"7FF9E3040000","name":"ucrtbase.dll","path":"C:\Windows\System32\ucrtbase.dll","symbolFilePath":"C:\Windows\System32\ucrtbase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA9380 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {bcrypt.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":17,"event":"module","body":{"module":{"addressRange":"7FF9E2750000","id":"7FF9E2750000","name":"bcrypt.dll","path":"C:\Windows\System32\bcrypt.dll","symbolFilePath":"C:\Windows\System32\bcrypt.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FAA080 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {vcruntime140.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":18,"event":"module","body":{"module":{"addressRange":"7FF9E2750000","id":"7FF9E2750000","name":"bcrypt.dll","path":"C:\Windows\System32\bcrypt.dll","symbolFilePath":"C:\Windows\System32\bcrypt.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA9DC0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {vcruntime140.dll}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":19,"event":"module","body":{"module":{"addressRange":"7FF9D87C0000","id":"7FF9D87C0000","name":"vcruntime140.dll","path":"C:\Windows\System32\vcruntime140.dll","symbolFilePath":"C:\Windows\System32\vcruntime140.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA9E80 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {pony.exe}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":20,"event":"module","body":{"module":{"addressRange":"7FF9D87C0000","id":"7FF9D87C0000","name":"vcruntime140.dll","path":"C:\Windows\System32\vcruntime140.dll","symbolFilePath":"C:\Windows\System32\vcruntime140.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::debug_session] Debug event: 000001AF3499FF10 Event: broadcaster = 000001AF34D83328 (lldb.process), type = 0x00000001 (state-changed), data = { process = 000001AF34D83300 (pid = 14368), state = running}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":21,"event":"module","body":{"module":{"addressRange":"7FF7B3FA0000","id":"7FF7B3FA0000","name":"pony.exe","path":"c:\Users\ricar\pony-lang\target\debug\pony.exe","symbolFilePath":"c:\Users\ricar\pony-lang\target\debug\pony.exe","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.391Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":22,"event":"continued","body":{"allThreadsContinued":true,"threadId":0}}
[2022-02-10T17:48:38.394Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA94C0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {bcryptprimitives.dll}
[2022-02-10T17:48:38.394Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA9E80 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {bcryptprimitives.dll}
[2022-02-10T17:48:38.394Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":23,"event":"module","body":{"module":{"addressRange":"7FF9E37B0000","id":"7FF9E37B0000","name":"bcryptprimitives.dll","path":"C:\Windows\System32\bcryptprimitives.dll","symbolFilePath":"C:\Windows\System32\bcryptprimitives.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.394Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":24,"event":"module","body":{"module":{"addressRange":"7FF9E37B0000","id":"7FF9E37B0000","name":"bcryptprimitives.dll","path":"C:\Windows\System32\bcryptprimitives.dll","symbolFilePath":"C:\Windows\System32\bcryptprimitives.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.396Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA99C0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel.appcore.dll}
[2022-02-10T17:48:38.396Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA94C0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel.appcore.dll}
[2022-02-10T17:48:38.396Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":25,"event":"module","body":{"module":{"addressRange":"7FF9E1FB0000","id":"7FF9E1FB0000","name":"kernel.appcore.dll","path":"C:\Windows\System32\kernel.appcore.dll","symbolFilePath":"C:\Windows\System32\kernel.appcore.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.396Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":26,"event":"module","body":{"module":{"addressRange":"7FF9E1FB0000","id":"7FF9E1FB0000","name":"kernel.appcore.dll","path":"C:\Windows\System32\kernel.appcore.dll","symbolFilePath":"C:\Windows\System32\kernel.appcore.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.399Z DEBUG codelldb::debug_session] Debug event: 000001AF34FAA0C0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {msvcrt.dll}
[2022-02-10T17:48:38.399Z DEBUG codelldb::debug_session] Debug event: 000001AF34FAA640 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000002 (modules-loaded), data = {msvcrt.dll}
[2022-02-10T17:48:38.399Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":27,"event":"module","body":{"module":{"addressRange":"7FF9E4DB0000","id":"7FF9E4DB0000","name":"msvcrt.dll","path":"C:\Windows\System32\msvcrt.dll","symbolFilePath":"C:\Windows\System32\msvcrt.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.399Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":28,"event":"module","body":{"module":{"addressRange":"7FF9E4DB0000","id":"7FF9E4DB0000","name":"msvcrt.dll","path":"C:\Windows\System32\msvcrt.dll","symbolFilePath":"C:\Windows\System32\msvcrt.dll","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-02-10T17:48:38.399Z DEBUG codelldb::debug_session] Debug event: 000001AF34FAABC0 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {}
[2022-02-10T17:48:38.399Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA7C80 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {}
[2022-02-10T17:48:38.399Z DEBUG codelldb::debug_session] Debug event: 000001AF34FA7640 Event: broadcaster = 000001AF34B88228 (lldb.target), type = 0x00000004 (modules-unloaded), data = {pony.exe}
[2022-02-10T17:48:38.399Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":29,"event":"module","body":{"module":{"id":"FFFFFFFFFFFFFFFF","name":""},"reason":"removed"}}
[2022-02-10T17:48:38.399Z DEBUG codelldb::debug_session] Debug event: 000001AF347AEFF0 Event: broadcaster = 000001AF34D83328 (lldb.process), type = 0x00000001 (state-changed), data = { process = 000001AF34D83300 (pid = 14368), state = exited}
[2022-02-10T17:48:38.399Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":30,"event":"output","body":{"output":"Process exited with code 0.\n"}}
[2022-02-10T17:48:38.399Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":31,"event":"exited","body":{"exitCode":0}}
[2022-02-10T17:48:38.399Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":32,"event":"terminated","body":{}}
[2022-02-10T17:48:38.400Z DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":9}
[2022-02-10T17:48:38.400Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":9,"success":true,"command":"threads","body":{"threads":[{"id":5788,"name":"3: tid=5788"},{"id":25468,"name":"4: tid=25468"},{"id":25768,"name":"1: tid=25768"},{"id":26632,"name":"2: tid=26632"}]}}
[2022-02-10T17:48:38.406Z DEBUG codelldb::dap_codec] --> {"command":"disconnect","arguments":{"restart":false,"terminateDebuggee":false},"type":"request","seq":10}
[2022-02-10T17:48:38.406Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":10,"success":true,"command":"disconnect"}
[2022-02-10T17:48:38.925Z DEBUG codelldb::dap_session] Client has disconnected
[2022-02-10T17:48:38.925Z DEBUG codelldb::debug_session] End of the requests stream
[2022-02-10T17:48:38.925Z DEBUG codelldb::debug_session] DebugSession::drop()
[2022-02-10T17:48:38.925Z DEBUG codelldb] Session has ended
[2022-02-10T17:48:38.936Z DEBUG codelldb] Exiting
Debug adapter exit code=0, signal=null.

@ricardopieper ricardopieper changed the title Cannot read propert Cannot read property 'id' of undefined Feb 10, 2022
@ricardopieper
Copy link
Author

ricardopieper commented Feb 10, 2022

This extension always worked with the msvc toolchain... right? I didn't have the GNU installed 5 days ago and it used to work just fine.

Because I just installed the nightly gnu toolchain, set it as default, and it's working now.
Maybe I'm hallucinating but the variable inspection seems to be far more accurate now. It had tons of trouble with enums before.

@vadimcn
Copy link
Owner

vadimcn commented Feb 10, 2022

Probably the same issue as #633. You can either roll back to an earlier nightly, or use the -gnu compilation target, which is what I'd recommend anyway.

The problem with onChangedActiveDebugSession seems to be a real bug, as my code does not expect session==undefined. However, this should occur only at the end of a debug session and shouldn't have affected breakpoints in any way.

Maybe I'm hallucinating but the variable inspection seems to be far more accurate now. It had tons of trouble with enums before.

This could be the difference between -msvc and -gnu targets. Enums are encoded very differently in the debug info between these two.

@ricardopieper
Copy link
Author

Thanks, I'll keep using the gnu toolchain.

@mikeHag
Copy link

mikeHag commented Feb 15, 2022

OS: Windows 11 Pro 21H2 build 22000.493
VSCode version: 1.64.1
CodeLLDB version: 1.6.10
Compiler: rustc 1.58.1 (db9d1b20b 2022-01-20) happened with nightly and beta as well
Debuggee: Windows executable (stable-x86_64-pc-windows-msvc)

The same thing happened to me. I struggled with it before seeing this report. I switched to stable-x86_64-pc-windows-gnu did a clean and rebuild. PDB files were not present and the debugger hit breakpoints.

I had not collected the verbose log, so switched back to stable-x86_64-pc-windows-msvc, did a clean and rebuild. A PDB file was back and the debugger still hit breakpoints.

Hmm

@vadimcn
Copy link
Owner

vadimcn commented Mar 13, 2022

Fixed in v1.7.0

@vadimcn vadimcn closed this as completed Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants