Skip to content

Commit c139898

Browse files
committed
improved debugging on windows, passing of custom python path to debugger, support relative paths for custom paths in auto complete
1 parent 88c6853 commit c139898

28 files changed

+7196
-141
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"runtimeArgs": [
3030
"--harmony"
3131
],
32-
"program": "./out/client/debugger/main.js",
32+
"program": "./out/client/debugger/vs/vsdebugger.js",
3333
"stopOnEntry": false,
3434
"args": [
3535
"--server=4711"

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Python
2-
Linting, Debugging, Intellisense, auto-completion, code formatting, snippets, unit testing, and more.
2+
Linting, Debugging (multi threaded, web apps), Intellisense, auto-completion, code formatting, snippets, unit testing, and more.
33
Works on both Windows and Mac.
44

55
##Features
@@ -8,13 +8,16 @@ Works on both Windows and Mac.
88
* Code formatting (autopep8, yapf, with config files)
99
* Renaming, Viewing references, Going to definitions, Go to Symbols
1010
* View signature and similar by hovering over a function or method
11-
* Debugging with support for local & global variables, arguments, expressions, watch window, stack information, break points
11+
* Debugging with support for local variables, arguments, expressions, watch window, stack information, break points
12+
* Debugging Multiple threads (Web Applications, etc) and expanding values in watch windows is supported on Windows
1213
* Unit testing (unittests and nosetests, with config files)
1314
* Sorting imports
1415
* Snippets
1516

16-
## Issues and Feature Requests
17+
## Issues and Feature Requests
1718
[Github Issues](https://github.com/DonJayamanne/pythonVSCode/issues)
19+
* Remote Debugging (coming soon)
20+
* Improved debugging for Mac (in development)
1821

1922
## Feature Details (with confiuration)
2023
* IDE Features
@@ -28,6 +31,13 @@ Works on both Windows and Mac.
2831
* - Support for docstring
2932
* - Ability to include custom module paths (e.g. include paths for libraries like Google App Engine, etc)
3033
* - - Use the setting python.autoComplete.extraPaths = []
34+
* - - For instance getting autocomplete/intellisense for Google App Engine, add the following to your settings file:
35+
```json
36+
"python.autoComplete.extraPaths": [
37+
"C:/Program Files (x86)/Google/google_appengine",
38+
"C:/Program Files (x86)/Google/google_appengine/lib"
39+
]
40+
```
3141
* Code formatting
3242
* - Use either yapf or autopep8 for code formatting (defaults to autopep8)
3343
* - auutopep8 configuration files supported
@@ -44,7 +54,9 @@ Works on both Windows and Mac.
4454
* - Evaluate Expressions
4555
* - Step through code (Step in, Step out, Continue)
4656
* - Add/remove break points
47-
* - Local variables, Global variables and arguments (experimental, still needs some polishing)
57+
* - Local variables and arguments
58+
* - Multiple Threads and Web Applications (such as Flask) (only Windows at this stage)
59+
* - Expanding values (viewing children, properties, etc) again only Windows at this Stage
4860
* Unit Testing
4961
* - unittests (default is on)
5062
* - nosetests (default is off)
@@ -59,6 +71,10 @@ Works on both Windows and Mac.
5971

6072
![Image of Renaming and Find all References](https://raw.githubusercontent.com/DonJayamanne/pythonVSCode/master/images/rename.gif)
6173

74+
![Image of Debugging](https://raw.githubusercontent.com/DonJayamanne/pythonVSCode/master/images/standardDebugging.gif)
75+
76+
![Image of Multi Threaded Debugging](https://raw.githubusercontent.com/DonJayamanne/pythonVSCode/master/images/flaskDebugging.gif)
77+
6278
## Requirements
6379
* Python is installed on the current system
6480
* - Path to python can be configured
@@ -78,6 +94,12 @@ Works on both Windows and Mac.
7894

7995
## Change Log
8096

97+
### Version 0.2.0
98+
* Improved debugger for Windows, with support for Multi threading, debugging Multi-threaded apps, Web Applications, expanding properties, etc
99+
* Added support for relative paths for extra paths in additional libraries for Auto Complete
100+
* Fixed a bug where paths to custom Python versions weren't respected by the previous (PDB) debugger
101+
* NOTE: PDB Debugger is still supported
102+
81103
### Version 0.1.3
82104
* Fixed linting when using pylint
83105

images/flaskDebugging.gif

1.08 MB
Loading

images/standardDebugging.gif

4.73 MB
Loading

package.json

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "python",
33
"displayName": "Python",
4-
"description": "Linting, Debugging, Intellisense, auto-completion, code formatting, snippets, and more.",
5-
"version": "0.1.3",
4+
"description": "Linting, Debugging (multi-threaded), Intellisense, auto-completion, code formatting, snippets, and more.",
5+
"version": "0.2.0",
66
"publisher": "donjayamanne",
77
"license": "SEE LICENSE IN LICENSE or README.MD",
88
"homepage": "https://github.com/DonJayamanne/pythonVSCode/blob/master/README.md",
@@ -54,13 +54,13 @@
5454
"debuggers": [
5555
{
5656
"type": "python",
57-
"label": "Python",
57+
"label": "Python (pdb)",
5858
"enableBreakpointsFor": {
5959
"languageIds": [
6060
"python"
6161
]
6262
},
63-
"program": "./out/client/debugger/main.js",
63+
"program": "./out/client/debugger/pdb/debuggerMain.js",
6464
"runtime": "node",
6565
"configurationAttributes": {
6666
"launch": {
@@ -73,23 +73,76 @@
7373
"description": "Workspace relative path to a text file.",
7474
"default": "__init__.py"
7575
},
76+
"pythonPath": {
77+
"type": "string",
78+
"description": "Path (fully qualified) to python executable. Use this if you want to use a custom pthon executable version.",
79+
"default": ""
80+
},
7681
"stopOnEntry": {
7782
"type": "boolean",
7883
"description": "Automatically stop after launch.",
7984
"default": true
85+
},
86+
"args": {
87+
"type": "array",
88+
"description": "List of arguments for the program",
89+
"default": []
8090
}
8191
}
8292
}
8393
},
8494
"initialConfigurations": [
8595
{
86-
"name": "Python",
96+
"name": "Python (Pdb)",
8797
"type": "python",
8898
"request": "launch",
8999
"program": "__init__.py",
90100
"stopOnEntry": true
91101
}
92102
]
103+
},
104+
{
105+
"type": "python_windows",
106+
"label": "Python (Windows)",
107+
"enableBreakpointsFor": {
108+
"languageIds": [
109+
"python"
110+
]
111+
},
112+
"program": "./out/client/debugger/vs/VSDebugger.js",
113+
"runtime": "node",
114+
"configurationAttributes": {
115+
"launch": {
116+
"required": [
117+
"program"
118+
],
119+
"properties": {
120+
"program": {
121+
"type": "string",
122+
"description": "Workspace relative path to a text file.",
123+
"default": "__init__.py"
124+
},
125+
"pythonPath": {
126+
"type": "string",
127+
"description": "Path (fully qualified) to python executable. Use this if you want to use a custom pthon executable version.",
128+
"default": ""
129+
},
130+
"args": {
131+
"type": "array",
132+
"description": "List of arguments for the program",
133+
"default": []
134+
}
135+
}
136+
}
137+
},
138+
"initialConfigurations": [
139+
{
140+
"name": "Python (Windows)",
141+
"type": "python_windows",
142+
"request": "launch",
143+
"program": "__init__.py"
144+
}
145+
]
93146
}
94147
],
95148
"configuration": {
@@ -224,7 +277,7 @@
224277
"type": "string",
225278
"default": "yapf",
226279
"description": "Path to yapf, you can use a custom version of yapf by modifying this setting to include the full path."
227-
},
280+
},
228281
"python.autoComplete.extraPaths": {
229282
"type": "array",
230283
"default": [],
@@ -253,6 +306,7 @@
253306
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./ && installServerIntoExtension ./out ./src/server/package.json ./src/server/tsconfig.json"
254307
},
255308
"dependencies": {
309+
"long": "^3.0.3",
256310
"named-js-regexp": "^1.3.1",
257311
"tmp": "0.0.28",
258312
"vscode-debugadapter": "^1.0.1",

0 commit comments

Comments
 (0)