2
2
Burr Sutter <burrsuter @gmail.com >
3
3
4
4
== Java
5
- mvn fabric8:debug
6
5
7
6
https://hub.docker.com/r/fabric8/java-jboss-openjdk8-jdk/
8
7
@@ -12,5 +11,93 @@ https://code.visualstudio.com/docs/java/java-kubernetes
12
11
13
12
https://code.visualstudio.com/blogs/2017/09/28/java-debug
14
13
14
+ For springboot
15
+
16
+ Create a directory hello/springboot/src/main/fabric8
17
+
18
+ Create a file called service.yml
19
+
20
+ ----
21
+ apiVersion: v1
22
+ kind: Service
23
+ spec:
24
+ type: NodePort
25
+ ----
26
+
27
+ mvn io.fabric8:fabric8-maven-plugin:3.5.40:setup
28
+
29
+ mvn fabric8:debug
30
+
31
+ ----
32
+ ...
33
+ [INFO] Using namespace: default
34
+ Trying internal type for name:Service
35
+ Trying internal type for name:Deployment
36
+ [INFO] Updating a Service from kubernetes.yml
37
+ [INFO] Updated Service: target/fabric8/applyJson/default/service-boot-demo-1.json
38
+ [INFO] F8: Enabling debug on Deployment boot-demo
39
+ [WARNING] The client is using resource type 'deployments' with unstable version 'v1beta1'
40
+ [INFO] F8: Waiting for debug pod with selector LabelSelector(matchExpressions=[], matchLabels={app=boot-demo, provider=fabric8, group=com.burrsutter}, additionalProperties={}) and environment variables {JAVA_DEBUG_SUSPEND=false, JAVA_ENABLE_DEBUG=true}
41
+ Trying internal type for name:Pod
42
+ [INFO] F8:[W] boot-demo-bd7bcfd87-smthv status: Pending
43
+ [INFO] F8:[W] boot-demo-55d8cc66fd-qpws4 status: Running Ready
44
+ [INFO] F8:[W] boot-demo-bd7bcfd87-smthv status: Pending
45
+ [INFO] F8:[W] boot-demo-55d8cc66fd-qpws4 status: Running
46
+ [INFO] F8:[W] boot-demo-bd7bcfd87-smthv status: Running Ready
47
+ [INFO] F8:[W] boot-demo-55d8cc66fd-qpws4 status: Running
48
+ [INFO] F8:[W] boot-demo-55d8cc66fd-qpws4 status: Running
49
+ [INFO] F8: Port forwarding to port 5005 on pod boot-demo-bd7bcfd87-smthv using command /Users/burrsutter/minikube_0.28.1/bin/kubectl
50
+ [INFO] F8:[W] boot-demo-55d8cc66fd-qpws4 status: Running : Pod Deleted
51
+ ----
52
+
53
+ Visual Studio Code
54
+
55
+ Debug - Add Configuration
56
+
57
+ which creates a Launch.json file, then comment it like so
58
+ ----
59
+ {
60
+ // Use IntelliSense to learn about possible attributes.
61
+ // Hover to view descriptions of existing attributes.
62
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
63
+ "version": "0.2.0",
64
+ "configurations": [
65
+ // {
66
+ // "type": "java",
67
+ // "name": "Debug (Launch)",
68
+ // "request": "launch",
69
+ // "cwd": "${workspaceFolder}",
70
+ // "console": "internalConsole",
71
+ // "stopOnEntry": false,
72
+ // "mainClass": "",
73
+ // "args": ""
74
+ // },
75
+ // {
76
+ // "type": "java",
77
+ // "name": "Debug (Launch)-HellobootApplication<boot-demo>",
78
+ // "request": "launch",
79
+ // "cwd": "${workspaceFolder}",
80
+ // "console": "internalConsole",
81
+ // "stopOnEntry": false,
82
+ // "mainClass": "com.burrsutter.HellobootApplication",
83
+ // "args": "",
84
+ // "projectName": "boot-demo"
85
+ // },
86
+ {
87
+ "type": "java",
88
+ "name": "Debug (Attach)",
89
+ "request": "attach",
90
+ "hostName": "localhost",
91
+ "port": "5005"
92
+ }
93
+ ]
94
+ }
95
+ ----
96
+
97
+ with port 5005
98
+
99
+
100
+
15
101
== Node.js
16
- https://developers.redhat.com/blog/2018/05/15/debug-your-node-js-application-on-openshift-with-chrome-devtools/
102
+ https://developers.redhat.com/blog/2018/05/15/debug-your-node-js-application-on-openshift-with-chrome-devtools/
103
+
0 commit comments