Comments (5)
Suggest configuring preLaunchTask
to trigger the mvnDebug tomcat7:run
in launch.json.
@testforstephen, please see if this can address the problem. If so, we won't need to add launchInTerminal
now.
from vscode-java-debug.
@akaroml Yes, use preLaunchTask
can fix the issue perfectly.
from vscode-java-debug.
Add a new task in tasks.json:
"tasks": [ { "taskName": "mvnDebug", "type": "shell", "command": "mvnDebug tomcat7:run", "group": "build" } ]
Then add preLaunchTask
in launch.json:
{ "type": "java", "name": "Debug (Attach)", "request": "attach", "hostName": "localhost", "port": 8000, "timeout": 30000, "sourcePaths": [ "${workspaceRoot}" ], "preLaunchTask": "mvnDebug" }
Select the new debug configuration as default config and Click F5. It can launch spring mvc in debug mode.
from vscode-java-debug.
Can we ask vscode to add an event like "postDebugTask" to let the user do some cleanup works?
from vscode-java-debug.
The original issue can be resolved by adding preLaunchTask. It would be nicer if vscode provide an event to allow cleanups. But this issue can be closed for now.
from vscode-java-debug.
Related Issues (20)
- Why does this not work with virtual workspaces? HOT 1
- jdk17 source code, src.zip which is invisible HOT 4
- Hot Code Replace returns `Cannot find any changed classes for hot replace!` message HOT 13
- Issue with GitHub Copilot extension Visual Studio Code HOT 2
- better support for copying complex objects
- Lombok functions are not retrieved in build phase HOT 1
- burpsui2022 HOT 1
- Support specifying explicit/separate JRE/JDK for a launch task HOT 3
- Debugger not working when jar packages contain unicode filenames HOT 3
- When attaching debugger to remote JVM, where do I see "System.out" output? HOT 2
- No delegateCommandHandler for vscode.java.resolveMainMethod HOT 3
- Java Code runs on jGrasp but not on VS Code HOT 5
- run burp HOT 1
- Can manually run project but not in VS Code due to an ambiguous failure to compile HOT 4
- ProjectName in debug profile doesn't match gradle projectName HOT 5
- Logpoints can't be evaluated
- Debugger for Java, "javaExec": "java.bat", spawn EINVAL
- Run Java code HOT 1
- Debugging for Java Visual Studio Code extension does not support class path wildcards HOT 1
- JAVA RUNNING ERROR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-java-debug.