Skip to content

Commit 8af61ae

Browse files
committed
Set up VS Code for debugging Java and Frontend
1 parent 1da7b59 commit 8af61ae

File tree

5 files changed

+108
-3
lines changed

5 files changed

+108
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,4 @@ src/main/webapp/js/bundles
2121
.project
2222
.factorypath
2323

24-
# VS Code project files
25-
.vscode
26-
2724
*.dylib

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["vscjava.vscode-java-pack", "vitest.explorer"]
3+
}

.vscode/launch.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": "2.0.0",
3+
"configurations": [
4+
{
5+
"name": "Debug Frontend",
6+
"type": "chrome",
7+
"request": "launch",
8+
"preLaunchTask": "Run Jenkins",
9+
"url": "http://localhost:8080/jenkins",
10+
"webRoot": "${workspaceFolder}/src/main/webapp",
11+
"pathMapping": {
12+
"/jenkins/plugin/pipeline-graph-view": "${workspaceFolder}/src/main/webapp"
13+
}
14+
},
15+
{
16+
"name": "Debug Java",
17+
"type": "java",
18+
"request": "attach",
19+
"preLaunchTask": "Run Jenkins",
20+
"hostName": "localhost",
21+
"port": 8000
22+
}
23+
],
24+
"compounds": [
25+
{
26+
"name": "Debug All",
27+
"configurations": ["Debug Java", "Debug Frontend"]
28+
}
29+
]
30+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.compile.nullAnalysis.mode": "automatic"
3+
}

.vscode/tasks.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Run Jenkins",
6+
"type": "shell",
7+
"command": "mvn",
8+
"args": ["hpi:run", "-Dskip.npm", "-P", "quick-build"],
9+
"options": {
10+
"env": {
11+
"MAVEN_OPTS": "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
12+
}
13+
},
14+
"dependsOn": ["Build Frontend"],
15+
"presentation": {
16+
"focus": true,
17+
"panel": "dedicated",
18+
"clear": true
19+
},
20+
"isBackground": true,
21+
"problemMatcher": [
22+
{
23+
"pattern": [
24+
{
25+
"regexp": ".",
26+
"file": 1,
27+
"location": 2,
28+
"message": 3
29+
}
30+
],
31+
"background": {
32+
"activeOnStart": true,
33+
"beginsPattern": ".*INFO.*Started initialization.*",
34+
"endsPattern": ".*INFO.*Jenkins is fully up and running.*"
35+
}
36+
}
37+
]
38+
},
39+
{
40+
"label": "Build Frontend",
41+
"type": "shell",
42+
"command": "npm",
43+
"args": ["run", "build:dev"],
44+
"group": "build",
45+
"presentation": {
46+
"focus": true,
47+
"panel": "dedicated",
48+
"clear": true
49+
},
50+
"isBackground": true,
51+
"problemMatcher": [
52+
{
53+
"pattern": [
54+
{
55+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
56+
"file": 1,
57+
"line": 2,
58+
"column": 3,
59+
"severity": 4,
60+
"message": 5
61+
}
62+
],
63+
"background": {
64+
"activeOnStart": true,
65+
"beginsPattern": ".*build started*",
66+
"endsPattern": ".*built in.*"
67+
}
68+
}
69+
]
70+
}
71+
]
72+
}

0 commit comments

Comments
 (0)