Skip to content

Commit 8d8e9cc

Browse files
authored
Add targetArch to Attach and documentation (#4901)
1 parent 3ffc296 commit 8d8e9cc

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

debugger-launchjson.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,17 @@ To disable Source Link for all URLs, use `"sourceLinkOptions": { "*": { "enabled
309309
If multiple entries cover the same URL, the more specific entry (the entry with the longer string length) will be used.
310310

311311
Currently Source Link only works for source files that can be accessed without authentication. So, for example, the debugger can download source files from open source projects on GitHub, but it cannot download from private GitHub repos, or from Visual Studio Team Services.
312+
313+
## Target Architecture options (macOS M1)
314+
315+
.NET on Apple M1 supports both x86_64 and ARM64. When debugging, the architecture of the process the debugger is attaching to and the debugger must match. If they do not match, it may result in `Unknown Error: 0x80131c3c`.
316+
317+
The extension will try to resolve `targetArchitecture` based on the output of `dotnet --info` in the PATH, else it will try to use the same architecture as VS Code.
318+
319+
You can override this behavior by setting `targetArchitecture` in your `launch.json`.
320+
321+
Example:
322+
323+
```json
324+
"targetArchitecture": "arm64"
325+
```

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,10 @@
659659
"description": "When true (the default state), the debugger will attempt faster evaluation by simulating execution of simple properties and methods.",
660660
"default": true
661661
},
662+
"targetArchitecture": {
663+
"type": "string",
664+
"description": "[Only supported in local macOS debugging] The architecture of the debuggee. This will automatically be detected unless this parameter is set. Allowed values are x86_64 or arm64."
665+
},
662666
"type": {
663667
"type": "string",
664668
"enum": [
@@ -2113,6 +2117,10 @@
21132117
"type": "boolean",
21142118
"description": "When true (the default state), the debugger will attempt faster evaluation by simulating execution of simple properties and methods.",
21152119
"default": true
2120+
},
2121+
"targetArchitecture": {
2122+
"type": "string",
2123+
"description": "[Only supported in local macOS debugging] The architecture of the debuggee. This will automatically be detected unless this parameter is set. Allowed values are x86_64 or arm64."
21162124
}
21172125
}
21182126
}
@@ -3236,6 +3244,10 @@
32363244
"type": "boolean",
32373245
"description": "When true (the default state), the debugger will attempt faster evaluation by simulating execution of simple properties and methods.",
32383246
"default": true
3247+
},
3248+
"targetArchitecture": {
3249+
"type": "string",
3250+
"description": "[Only supported in local macOS debugging] The architecture of the debuggee. This will automatically be detected unless this parameter is set. Allowed values are x86_64 or arm64."
32393251
}
32403252
}
32413253
}

src/tools/OptionsSchema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@
491491
"type": "boolean",
492492
"description": "When true (the default state), the debugger will attempt faster evaluation by simulating execution of simple properties and methods.",
493493
"default": true
494+
},
495+
"targetArchitecture": {
496+
"type": "string",
497+
"description": "[Only supported in local macOS debugging] The architecture of the debuggee. This will automatically be detected unless this parameter is set. Allowed values are x86_64 or arm64."
494498
}
495499
}
496500
},

0 commit comments

Comments
 (0)