Skip to content

Commit b3cce80

Browse files
authored
Merge pull request #3068 from Microsoft/seanmcm/0_21_0_release
2 parents 9702eae + a533eb9 commit b3cce80

31 files changed

Lines changed: 557 additions & 406 deletions

Documentation/Debugger/How To Debug MIEngine.md

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ You can open the solution file **MIDebugEngine.sln** located under **src** and c
1515
* Microsoft.MIDebugEngine.dll
1616
* vscode\OpenDebugAD7.exe
1717
* vscode\Microsoft.DebugEngineHost.dll
18+
* vscode\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll
1819

1920
The symbol files are as follows:
2021

2122
**On Windows**
2223
* Microsoft.MICore.pdb
23-
* Microsoft.MIDebugEngine.dll
24+
* Microsoft.MIDebugEngine.pdb
2425
* vscode\OpenDebugAD7.pdb
2526
* vscode\Microsoft.DebugEngineHost.pdb
2627

@@ -51,11 +52,13 @@ This will cause the debugger to look like it has hung once you start debugging,
5152

5253
### Debugging MIEngine running on Linux or Mac OS X
5354

55+
#### With MonoDevelop
56+
5457
On Linux and Mac OS X, we use `mono` as our framework. You can download Xamarin Studio v5.10.1.6 and remotely attach to your Mac or Linux box to debug there.
5558

56-
#### Install Prerequisites
57-
1. Install [GTK](http://www.mono-project.com/download/)
58-
2. Install [Xamarin Studio v5.10.1.6](http://download.xamarin.com/studio/Windows/XamarinStudio-5.10.1.6-0.msi)
59+
##### Install Prerequisites
60+
1. Install [GTK](http://www.mono-project.com/download/).
61+
2. Install [Xamarin Studio v5.10.1.6](http://download.xamarin.com/studio/Windows/XamarinStudio-5.10.1.6-0.msi).
5962

6063
Remote attach functionality behind a flag. You can run it like this:
6164
```PowerShell
@@ -64,26 +67,60 @@ set MONODEVELOP_SDB_TEST=1
6467
MonoDevelop.exe
6568
```
6669

67-
#### Create an empty project for attaching (one-time setup)
70+
##### Create an empty project for attaching (one-time setup)
6871

69-
1. Launch MonoDevelop
70-
2. File -> New Solution
71-
3. Misc/Generic Project
72-
4. Name project and hit "Create"
73-
5. Right-click the project node (blue square) and do "Options"
72+
1. Launch MonoDevelop.
73+
2. File -> New Solution.
74+
3. Misc/Generic Project.
75+
4. Name project and hit "Create".
76+
5. Right-click the project node (blue square) and do "Options".
7477
6. Under Run -> Custom Commands, select "Execute" in the lower dropdown and choose a command (I use `c:\windows\notepad.exe` - it doesn't matter what the command is, but MonoDevelop requires it to exist before it'll light up the Run menu).
7578

76-
#### Configure the extension to enable remote debugging
79+
##### Configure the extension to enable remote debugging
7780

7881
Open the **~/.vscode/extensions/ms-vscode.cpptools-\<version\>/debugAdapters/OpenDebugAD7** file with a text editor and locate and uncomment the line at the bottom. When you start debugging, it will now hang until the remote debugger is attached from Xamarin Studio.
7982

80-
#### Attach the remote debugger
83+
##### Attach the remote debugger
8184

82-
In MonoDevelop: Run -> Run With -> Custom Command Mono Soft Debugger
83-
Fill in the IP and port of the Linux/Mac OS X machine and hit "Connect" to start debugging
85+
In MonoDevelop: Run -> Run With -> Custom Command Mono Soft Debugger.
86+
Fill in the IP and port of the Linux/Mac OS X machine and hit "Connect" to start debugging.
8487

8588
After you've done this once, you can hit the MonoDevelop "Play" button or <kbd>F5</kbd> to bring up the connect dialog again.
8689

87-
Note: If you are debugging to CentOS, you will need to make an exception in the firewall
90+
#### With VS Code + Mono Debug
91+
92+
##### Install Prerequisites
93+
1. Install [VS Code](https://code.visualstudio.com/Download).
94+
2. Install Mono Debug extension for VS Code.
95+
96+
##### Create an empty project (one-time setup)
97+
1. Open to a new folder and create `.vscode/launch.json`.
98+
2. Create the following configuration in launch.json.
99+
```
100+
{
101+
"version": "0.2.0",
102+
"configurations": [
103+
{
104+
"name": "Attach to Mono",
105+
"request": "attach",
106+
"type": "mono",
107+
"address": "<INSERT_MACHINE_IP_ADDRESS_HERE>",
108+
"port": 1234
109+
}
110+
]
111+
}
112+
```
113+
114+
##### Configure the extension to enable remote debugging
115+
116+
Open the **~/.vscode/extensions/ms-vscode.cpptools-\<version\>/debugAdapters/OpenDebugAD7** file with a text editor and locate and uncomment the line at the bottom. When you start debugging, it will now hang until the remote debugger is attached from VS Code.
117+
118+
##### Attach the remote debugger
119+
120+
Select the `Attach to Mono` configuration and hit F5.
121+
122+
#### Additional Notes
123+
124+
Note: If you are debugging to CentOS, you will need to make an exception in the firewall.
88125
* `sudo firewall-cmd --zone=public --add-port=1234/tcp --permanent`
89126
* `sudo firewall-cmd --reload`

Documentation/FAQs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ When you start debugging, if it is showing that your breakpoints aren't bound (s
2323

2424
### Debugging starts but all the lines in my stack trace are grey
2525

26-
If your debugger is showing a grey stacktrace or won't stop at a breakpoint,or the symbols in the call stack are grey then your executable was compiled without [debug symbols](#how-to-enable-debug-symbols).
26+
If your debugger is showing a grey stacktrace or won't stop at a breakpoint, or the symbols in the call stack are grey then your executable was compiled without [debug symbols](#how-to-enable-debug-symbols).
2727

2828
## How to enable debug symbols?
2929

Documentation/LanguageServer/MinGW.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ When you set the `compilerPath` property and change `intelliSenseMode` to `clang
2020
}
2121
```
2222

23+
Replace "gcc.exe" with whatever compiler you're using, e.g. "g++.exe", "clang-5.0.exe", etc. -- just make sure the file is a valid Windows executable (not a 0 size symlink).
24+
25+
For Cygwin, set the `compilerPath` to the appropriate Cygwin path, e.g. "C:/cygwin64/bin/g++.exe".
26+
27+
If it seems like the `compilerPath` is not getting used, you can debug the issue via [enabling logging](Enabling%20logging.md).
28+
2329
## Extension version 0.16.1 and earlier:
2430

2531
If you have an older version of the C/C++ extension installed, use [these instructions](Archive/MinGW.md) instead.

Extension/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"outFiles": [
1616
"${workspaceFolder}/out/**/*.js"
1717
],
18-
"preLaunchTask": "compile",
18+
"preLaunchTask": "TypeScript Compile",
1919
},
2020
{
2121
"name": "Launch Tests",
@@ -31,7 +31,7 @@
3131
"outFiles": [
3232
"${workspaceFolder}/out/test/**/*.js"
3333
],
34-
"preLaunchTask": "compile"
34+
"preLaunchTask": "TypeScript Compile"
3535
},
3636
{
3737
"name": "Node Attach",

Extension/.vscode/tasks.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"tasks": [
66
{
77
"label": "TypeScript Compile",
8-
"identifier": "compile",
98
"group": {
109
"kind": "build",
1110
"isDefault": true
@@ -29,7 +28,6 @@
2928
},
3029
{
3130
"label": "TypeScript Lint",
32-
"identifier": "tslint",
3331
"group": "build",
3432
"isBackground": false,
3533
"type": "shell",
@@ -53,7 +51,7 @@
5351
]
5452
},
5553
"dependsOn": [
56-
"compile"
54+
"TypeScript Compile"
5755
]
5856
}
5957
]

0 commit comments

Comments
 (0)