Comments (6)
Yes, debug config example: https://github.com/lyzhang1999/zadig/blob/main/.nocalhost/config.yaml
now we support Goland and IDEA for v0.4.18, and will support PyCharm and PhpStorm in v0.4.19(this week).
if you use Goland or IDEA, you can add "Nocalhost Go" or "Nocalhost Java" after you set debug config, and click "debug" icon after enter develop mode.
from nocalhost.
@lyzhang1999 Is there a guide?
from nocalhost.
video: https://www.bilibili.com/video/BV1Fh411B7Vb?from=search&seid=7008395873990702689
tutorials for zadig: https://koderover.com/tutorials/codelabs/Nocalhost/index.html?index=..%2F..index#3
from nocalhost.
@lyzhang1999 按照下面所配置的,在goland中,run 是可以的,debug几乎总是失败。
name: gin-demo
serviceType: deployment
containers:
- name: gin-demo
dev:
gitUrl: ""
image: codingcorp-docker.pkg.coding.net/nocalhost/dev-images/golang:1.16
shell: ""
workDir: /home/nocalhost-dev
storageClass: ""
resources: null
persistentVolumeDirs: []
command:
build: []
run:
- go
- run
- ./main.go
debug:
- dlv
- debug
- ./main.go
- --listen=:2345
- --headless=true
- --api-version=2
- --accept-multiclient
hotReloadRun: []
hotReloadDebug: []
debug:
remoteDebugPort: 2345
useDevContainer: false
sync: null
env:
- name: GOPROXY
value: https://goproxy.cn
envFrom: null
portForward: []
debug 日志
/home/zouhl/.nh/bin/nhctl exec default.application --deployment gin-demo --command sh --command -c --command "dlv debug ./main.go --listen=:2345 --headless=true --api-version=2 --accept-multiclient" --kubeconfig /home/zouhl/.nh/intellij-plugin/kubeConfigs/bb64f37b-ce28-4215-9d52-8e2a4ef5516b_config --namespace default
API server listening at: [::]:2345
2021-08-12T06:34:17Z error layer=rpc rpc:invalid character 'p' looking for beginning of value
2021-08-12T06:34:21Z error layer=rpc rpc:invalid character 'p' looking for beginning of value
or
/home/zouhl/.nh/bin/nhctl exec default.application --deployment gin-demo --command sh --command -c --command "dlv debug ./main.go --listen=:2345 --headless=true --api-version=2 --accept-multiclient" --kubeconfig /home/zouhl/.nh/intellij-plugin/kubeConfigs/bb64f37b-ce28-4215-9d52-8e2a4ef5516b_config --namespace default
API server listening at: [::]:2345
^C
from nocalhost.
方便留一个邮箱吗?
from nocalhost.
I hava met this question too. Remote Debug
will run command dlv debug
in remote container and set up one port map :. But when I use nocalhost go Debug
function,the debugger cannot connect to localhost mapped port(always at connecting state). Actually I can telnet localhost mappedPort
.
Finally I make a port map manually like 36789:6789
,and use Go Remote
to connect to port 36789 which at localhost.
from nocalhost.
Related Issues (20)
- Istio注入,Mesh模式无效
- istio注入,Mesh模式下
- What is the status of nocalhost? HOT 2
- 可以出一个django的远程debug示例吗?
- 无法连接k8s集群,报错:Daemon responses empty data to GetDaemonServerInfo
- CNCF TOC annual review due HOT 3
- Error: Post "https://x.x.x.x:6443/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": Forbidden
- 支持不改动container name为nocalhost-dev
- PHP远程调试没起到效果
- Code of Conduct update to replace mediator email with the CNCF committee email
- Supports change the sync dir when DevMode started
- gitIgnore synchronization does not take effect HOT 1
- 有没有可能支持远程调试C/C++代码
- Failed to get node configs, please try again HOT 2
- Security Slam 2023 Participation
- vscode remote-ssh方式无法工作 HOT 1
- proxy mode下,如果代理到本地的进程A`想访问部署在集群中的下游服务B,是不是没法成功访问
- nocalhost组件依赖socat组件咨询
- 你们的微信二维码 没有看过我的请求
- Plugin 'Nocalhost' (version '0.6.29-231') is not compatible with the current version of the IDE, because it requires build 231.* or older but the current build is IU-233.11799.241 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 nocalhost.