Tag: visual studio code

无法将debugging器附加到在主机模式下在Docker容器内运行的node.js应用程序

我试图将Visual Studio Code(v1.7)debugging器附加到在主机模式下在Docker容器内运行的node.js应用程序。 DEBUG=* /usr/bin/node –debug-brk /home/app/node_modules/homebridge/bin/homebridge — -U /home/data -P /home/app 命令: docker run -it –rm –net="host" \ –name homebridge \ -p "51826:51826" -p "5858:5858" \ -v `pwd`:/home/app \ dev/homebridge 使用默认的launch.json: { "version": "0.2.0", "configurations": [ { "name": "Docker: Attach to Node", "type": "node", "request": "attach", "port": 5858, "address": "localhost", "restart": false, "sourceMaps": false, […]

VSCode在连接到Windows泊坞窗容器上的远程debugging器时挂起在断点上

将VSDB.exe与代码clr远程debugging器连接到VSCode中的一个Windows Docker容器中的一个运行进程的dotnet时,应用程序进入debugging模式,并检索一个线程列表并显示debugging输出,但是当我点击一个断点时,VS代码挂起并停止debuggingclosuresdocker容器。 使用相同的debugging器在本地工作正常。 这是在Docker或VSCode的问题? docker信息 Server Version: 17.06.0-ce Storage Driver: windowsfilter Windows: Logging Driver: json-file Plugins: Volume: local Network: l2bridge l2tunnel nat null overlay transparent Log: awslogs etwlogs fluentd json-file logentries splunk syslog Swarm: inactive Default Isolation: hyperv Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-1834) Operating System: Windows 10 Enterprise N OSType: windows Architecture: x86_64 Debug Mode […]

Python远程debugging器不会在VS代码中debugging我的代码

我正在Docker容器里面运行Python 3.6的应用程序。 我试图从我的Mac上的VS Codedebugging烧瓶应用程序。 我已经附加了远程debugging器,虽然我的断点没有被击中,并且在VS Code中都显示为“未validation”的断点。 当我运行远程debugging器时,它在Resource.dispatchRequest()中的flask的__init__.py第587行中断开,它读取resp = meth(*args, **kwargs) 。 试图向前迈进,迈进或迈出不成果。 继续打多次(大约20次)将从我的testing脚本继续下一个请求。 debugging器从来没有停止在我的代码中的断点,它显示我的断点作为未经validation的断点。 当debugging器停留在烧瓶请求代码中时,调用堆栈将以灰色显示我的代码中的方法,并在其旁边显示“未知源”。 我无法在调用堆栈中进入它们,尽pipe我可以在“variables”窗口中看到局部variables。 我怎样才能得到VS代码来debugging我的代码?

Visual Studio代码 – 如何远程debuggingDocker容器中的Python代码

Iam试图在VSC中远程dubug python: 这是main.py文件: print('Hello, World') debug.py: import ptvsd ptvsd.enable_attach('my_secret', address=('0.0.0.0', 7102)) ptvsd.wait_for_attach() Dockerfile: FROM python:3.6-slim EXPOSE 7102 RUN pip install ptvsd WORKDIR /app COPY . . CMD ["python", "debug.py"] 它是launch.json文件: { "version": "0.2.0", "configurations": [ { "name": "Attach (Remote Debug)", "type": "python", "request": "attach", "localRoot": "${workspaceRoot}", "remoteRoot": "/app", "port": 7102, "secret": "my_secret", "host": "172.17.0.3" } […]

用Docker在Mac上的SQL Server:用户'sa'login失败。

我正在尝试使用Docker在我的Mac上使用SQL Server。 我已经安装了图像,我正在运行SQL Server。 当我运行上面的代码,并检查正在运行的容器使用“dockerPS”容器始终停止。 因此,我运行以下命令来启动容器的容器id。 docker启动0e84faabe9b35b2e4e8e39be3f389b38c151a3a6e7c3c82995f3ea6dc0e8ed1e然后SQL容器保持运行。 我想用VS代码连接到SQL服务器,但消息不断说用户'sa'的login失败我已经安装了sql-cli来检查sql连接,但它没有工作。 我尝试使用以下凭证连接到sql server:mssql -u sa -p sa123! 我给出了启动sql容器。 任何人都可以帮我这个吗? 这是我在VS代码中得到的。

.Net Core Clrdebugging器VSDBG在Windows Docker容器中连接到远程进程时暂停应用程序

我有一个.net核心应用程序运行在一个Windowsdocker容器,我想附加VS代码。 当我连接到远程进程,似乎进程冻结,如果我断开debugging器,容器closures没有任何错误。 launch.json { "name": ".NET Core Remote Attach", "type": "coreclr", "request": "attach", "pipeTransport": { "pipeProgram": "powershell", "pipeArgs": ["docker exec -i –privileged amazing_johnson" ], "pipeCwd": "${workspaceRoot}", "debuggerPath": "c:\\coreclr-debug\\vsdbg.exe" }, "processId": "1736" }, debugging输出控制台中的结果: Starting: "powershell" "docker exec -i –privileged amazing_johnson" "c:\coreclr-debug\vsdbg.exe –interpreter=vscode" 将debugging器附加到远程进程后,当我尝试访问该站点时,它只是挂起,VSCode列出线程并在terminal中显示一些JSON,但没有任何反应。 断开连接会closures容器。 为什么发生这种情况?

如何用VS代码远程debuggingDocker容器中的Python代码

我刚刚注册了这个问题。 这是关于是否有可能远程debugging与VS代码的Docker容器中的Python代码。 我在这里有一个完全configuration的Docker容器。 我得到了一些帮助,而且对docker工人来说我还是很新的。 它运行Odoo v10。 但我不能在VS代码中的远程debugging工作。 我已经尝试了这个解释,但我真的不明白。 这甚至有可能吗? 如果是的话,我怎样才能使它工作? 我使用VS Code 1.6.1和Don Jayamanne的Python扩展运行Kubuntu 16.04。 啊,我希望我在这个问题的正确位置,这是不违反任何规则。 更新: 刚刚尝试了埃尔顿·斯通曼的方式。 有了它我得到这个错误: There was an error in starting the debug server. Error = {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect", "address":"172.21.0.4","port":3000} 我的Dockerfile看起来像这样: FROM **cut_out** USER root # debug/dev settings RUN pip install \ watchdog COPY workspace/pysrc /pysrc RUN apt-get update \ && apt-get install […]

debugging在Docker中运行的python应用程序

最近我刚开始试图把我的头围在Docker上,并成功地开发了一台开发机器。 我现在要做的是能够在我的Python应用程序(特别是Django)中使用Visual Studio代码中的debugging器。 我已经试过跟在VS代码的python扩展的有限的文档,它解释了远程debugging的参数。 Dockerfile FROM python:3.5.2 RUN apt-get update \ –no-install-recommends && rm -rf /var/lib/apt/lists/* \ && mkdir -p /code \ EXPOSE 8000 WORKDIR /code COPY requirements.txt /code RUN /bin/bash –login -c "pip install -r requirements.txt" ADD . /code CMD [] 泊坞窗,compose.yml version: '2' services: db: image: postgres web: build: . volumes: – .:/code […]

如何将VS代码launch.json转换为Visual Studio launchSettings.json for .Net核心Web应用程序

我需要将VSCode中的launch.json文件转换为Windows上的Visual Studios中的launchSettings.json文件,以便我可以使用Docker进行debugging。 下面是我在VSCode中工作的launch.json文件。 { "version": "0.2.0", "configurations": [ { "name":".NET Core Docker Launch (web)", "type": "coreclr", "request": "launch", "preLaunchTask": "composeForDebug", "cwd": "/app", "program": "/app/test.dll", "sourceFileMap": { "/app": "${workspaceRoot}" }, "launchBrowser": { "enabled": true, "args": "${auto-detect-url}", "windows": { "command": "cmd.exe", "args": "/C start ${auto-detect-url}" }, "osx": { "command": "open" } }, "pipeTransport": { "pipeProgram": "/bin/bash", "pipeCwd": […]

无法在Docker上运行asp.net mvc 6

我遵循Visual Studio代码的指导来创build一个ASP.NET MVC应用程序。 我可以在我的本地(Windows 8)上运行它。 但是当我试图将其发布到Docker,并发生问题。 我的dockerfile像 FROM microsoft/aspnet:1.0.0-beta4 #install npm in docker image RUN apt-get update && apt-get install -y curl RUN curl -sL https://deb.nodesource.com/setup | bash – RUN apt-get install -y nodejs #install bower and grunt RUN npm install -g bower RUN npm install -g grunt-bower-cli RUN npm install -g grunt RUN npm […]