远程调试如何指定socks/http代理?
远程调试的时候如何指定代理
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Rmote Debug zdata 48974",
"projectName": "zdata",
"request": "attach",
"hostName": "192.168.50.122", //地址
"port": 48974 //端口
}
]
}
Your debug config is correct. Meanwhile, you need to enable debug mode in your remote JVM by using the following command line format. 你的远程调试配置是对的。不过你需要在你的远程机器中按如下的命令行格式启动Java程序。
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=48974,quiet=y -cp . MyMainApplication
@acodervic 如果你指的是让debugger通过网络代理连接到远程机器,你需要把网络代理信息设置在vscode settings java.jdt.ls.vmargs里面。参考下面的页面关于怎么为java插件配置代理。
https://github.com/redhat-developer/vscode-java/wiki/Using-a-Proxy
ok thanks
Jinbo Wang @.***> 于2022年5月30日周一 16:48写道:
@acodervic https://github.com/acodervic 如果你指的是让debugger通过网络代理连接到远程机器,你需要把网络代理信息设置在vscode settings java.jdt.ls.vmargs里面。参考下面的页面关于怎么为java插件配置代理。
https://github.com/redhat-developer/vscode-java/wiki/Using-a-Proxy
— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-java-debug/issues/1157#issuecomment-1140880758, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUN2JBLN7DCQPXKQD7GOCDVMR6FJANCNFSM5UHBHL3A . You are receiving this because you were mentioned.Message ID: @.***>
@acodervic 如果你指的是让debugger通过网络代理连接到远程机器,你需要把网络代理信息设置在vscode settings
java.jdt.ls.vmargs里面。参考下面的页面关于怎么为java插件配置代理。https://github.com/redhat-developer/vscode-java/wiki/Using-a-Proxy
兄弟试过没,我试了一下指定http/https代理没用啊,还是连接不上
[Error - 11:15:48 AM] Aug 1, 2022, 11:15:48 AM [error response][attach]: org.eclipse.jdi.TimeoutException
null
org.eclipse.jdi.TimeoutException
at org.eclipse.jdi.internal.connect.SocketTransportService.attach(SocketTransportService.java:163)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:49)
at org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:139)
at com.microsoft.java.debug.core.DebugUtility.attach(DebugUtility.java:304)
at com.microsoft.java.debug.core.adapter.handler.AttachRequestHandler.handle(AttachRequestHandler.java:67)
at com.microsoft.java.debug.core.adapter.DebugAdapter.lambda$dispatchRequest$0(DebugAdapter.java:91)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
at com.microsoft.java.debug.core.adapter.DebugAdapter.dispatchRequest(DebugAdapter.java:90)
at com.microsoft.java.debug.core.adapter.ProtocolServer.dispatchRequest(ProtocolServer.java:118)
at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.lambda$new$0(AbstractProtocolServer.java:78)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
写在启动配置里面也没用
{
"type": "java",
"name": "Rmote Debug xxxx 36804",
"projectName": "zaporxy",
"request": "attach",
"hostName": "192.168.50.122",
"port": 24676,
"args":" -Dhttp.proxyHost=192.168.56.102 -Dhttp.proxyPort=10801 -Dhttps.proxyHost=192.168.56.102 -Dhttps.proxyPort=10801 "
}