Tag: 远程debugging

通过远程debugging器连接Docker容器

我正在尝试使用JConsole或JVisualVM连接我的Docker容器。 有一些文章,我喜欢http://www.jamasoftware.com/blog/monitoring-java-applications/,但这并不适用于我。 我如何将它们连接到我正在运行的容器。 我使用最新的docker为Mac,所以我没有docker机IP为192.168.99.100

使用适用于Docker的Visual Studio工具部署和debugging远程Linux Docker容器

我想弄清楚如何使用Visual Studio Tools for Docker部署到远程容器,并debugging我的ASP.NET Core应用程序。 其实,我正在以下情况下工作: 我的开发机器是一个Hyper-V虚拟机。 Docker安装在整个VM / Dev机器运行的主机上(1) 我相信,Visual Studio 2017不包括这个用例,但我正在寻找实现,如果我可以调整它来解决这个限制。 (1) 我在主机上安装了Docker,因为我的CPU不支持嵌套虚拟化

在生产中debuggingdocker + gunicorn应用程序的替代scheme

我很好奇人们用什么替代品来debugging在Docker容器中运行uwsgi或gunicorn的应用程序。 这种情况将是一个无法在本地复制的错误,而且似乎只在生产/分期阶段才会发生。 从我看到的,有些人似乎build议在服务器上运行应用程序的第二个实例,并使用ssh隧道来debugging。 添加一些痕迹,一旦发现问题,杀死第二个实例,并恢复正常。 另一个select是使用像rpdb或pudb这样的东西,但是像往常一样,这意味着必须添加追踪到任何我们想添加断点的位置,以及重新启动gunicorn或Docker容器来考虑这些变化。 最后一个选项,我能想到的是使用验尸,这也是好的,但像往常一样,意味着重新启动服务器,因为我必须包含痕迹,所以如果发生exception,debugging器将显示… 对我来说干扰less一些似乎是第一select,因为我可以同时运行两个相同的应用程序的实例,debugging后,我可以closuresdebugging的一个,原来的一个没有改变… … 任何其他选项?

如何确定为什么sigterm被发送到在mesos的docker容器内处理运行?

我有一个docker容器,我可以在当地擅长罚款。 然而,当在一个mesos集群上运行时,我得到了SIGTERMS /usr/my_script.sh: line 57: 310 Killed xsltproc sort.xsl ${2} > ${2}_bat W0703 09:09:54.465442 5074 logging.cpp:91] RAW: Received signal SIGTERM from process 2262 of user 0; exiting 我不明白这个问题来自哪里以及如何最好地debugging它。 我怎样才能找出什么是我的容器? 我试图增加可用容量超过4GB的内存,但无济于事。 而且,根据/usr/bin/time -v xsltproc sort.xsl offending_file.xml > sortedFile.xml这个过程应该只消耗1GB RAM。 我也试着用googlesearchW0703的错误输出和5074 logging.cpp:91 ,但是没有用。 它也引发了一个问题,为什么容器在本地运行时没有执行命令的问题。

Docker Windows Nanoserver容器中的Visual Studio 2017远程debugging器无法启动

我将文件从Visual Studio 2017远程debugging器复制到运行nano服务器的Windows泊坞窗图像。 以正确的参数在无头模式下运行MSVSMon.exe后,没有任何反应。 没有进程正在运行,应用程序日志中没有生成错误。 为什么不启动MSVSMon.exe? 在官方网站( https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging#bkmk_configureService )上没有说明如何以非交互方式将程序设置为服务。 那么,我将如何启动这个服务,因为nano服务器没有用户? PS C:\debug\vs_remotetools> .\msvsmon.exe /noauth /anyuser /silent /nostatus /noclrwarn /nosecuritywarn /nofirewallwarn /nowowwarn /timeout:36000 PS C:\debug\vs_remotetools> get-process Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName ——- —— —– —– —— — — ———– 0 5 1136 4752 2.20 1348 1 CExecSvc 0 3 1704 2900 0.09 1888 […]

从Docker Windows容器远程debugging.Net Core控制台应用程序时,Visual Studio 2017不加载debugging符号

远程debuggingWindows Docker容器上托pipe的.net核心控制台应用程序时,无法逐句通过代码。 即使PDB与DLL一起出现,也会出现错误“无法find或打开PDB文件”。 Dockerfile FROM microsoft/windowsservercore WORKDIR / COPY ./tools ./ RUN dotnet-dev-win-x64.1.0.4.exe /install /quiet RUN vs_remotetools.exe /install /quiet EXPOSE 4022 COPY ./Clients/Client.Web.Identity.Client.MVC ./Clients/Client.Web.Identity.Client.MVC WORKDIR ./Clients/Client.Web.Identity.Client.MVC RUN dotnet restore Client.MVC.csproj RUN dotnet build Client.MVC.csproj CMD dotnet run http://*60720 Visual Studiodebugging输出https://pastebin.com/D77JCtr9 注意第二行: 'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Clients\Client.Web.Identity.Client.MVC\bin\Debug\netcoreapp1.1\Client.Web.Identity.Client.Mvc.dll'. Cannot find or open the PDB file. 容器输出显示MSVSMON运行与DLLpath中存在Client.Web.Identity.Client.Mvc.pdb。 PS […]

使用Mocha + TypeScript + Docker远程debuggingnode.js。 debugging器不反映实际的执行?

我在WebStorm工作,如果这可能是问题(但似乎不太可能)。 我在docker容器上运行以下命令来启动集成testing,我想在IDE内远程debugging。 NODE_ENV=test TS_NODE_DISABLE_WARNINGS=1 ./node_modules/.bin/mocha –debug-brk –compilers ts:ts-node/register test/integration/**/*.spec.ts", 执行此操作后,节点进程等待端口8080上的debugging连接。 集成testing看起来像这样: import sinon = require('sinon'); import chai = require('chai'); import supertest = require('supertest'); import sinonChai = require('sinon-chai'); const expect = chai.use(sinonChai).expect; import {server} from '../../src/server'; import {authenticate} from '../../src/middleware'; const routeContent = 'whatever'; const authenticatedRoute = '/authenticatedRoute'; describe('The authenticate middleware', () => { before(() => […]

远程LLDBdebugging – Docker容器

我正在尝试使用LLDB 4.0.1进行远程debugging。 Arch linux有一个docker(17.06.0-ce)容器。 Docker容器被设置为特权模式 ,所以现在LLDB可以在容器中启动。 容器包含Rust可执行文件的core_service。 在container (lldb) target create target/debug/core_service Current executable set to 'target/debug/core_service' (x86_64). (lldb) process launch Process 182 launched: '/srv/core_service/target/debug/core_service' (x86_64)运行的命令(lldb) target create target/debug/core_service Current executable set to 'target/debug/core_service' (x86_64). (lldb) process launch Process 182 launched: '/srv/core_service/target/debug/core_service' (x86_64) (lldb) target create target/debug/core_service Current executable set to 'target/debug/core_service' (x86_64). (lldb) process […]

Django在Docker之外运行良好,但从未在Docker中启动,如何查找问题?

我有一个工作的Django项目,在过去的几个星期里build立和部署了许多图像。 当我以“python manage.py runserver”的身份运行时,我的django项目保持正常工作状态,并且Docker镜像保持正常(所有成功构build)。 然而,Django的应用程序现在不部署。 可能是什么问题,我应该从哪里开始寻找? 我已经尝试了日志,但他们只说“启动Django”而没有实际启动服务 我使用github,并回到以前版本的代码,现在都没有工作,即使代码是完全一样的。 它也无法在AWS Elastic Beanstalk基础架构上部署Django服务器,这是我使用此代码的最终目标。 start.sh: #!/bin/bash echo Starting Django cd TN_API exec python ../manage.py runserver 0.0.0.0:8000 Dockerfile: FROM python:2.7.13-slim # Set the working directory to /app WORKDIR /TN_API # Copy the current directory contents into the container at /app ADD . /TN_API # COPY startup script into known […]

Golang远程debugging器与vscode

我已经按照https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code将我的vscode附加到远程debugging器。 该代码在docker上执行,go文件位于共享驱动器上,可以从docker和我的工作站访问。 在我的工作站上,我可以启动代码并使用以下configuration连接到远程debugging器: { "name": "Remote", "type": "go", "request": "launch", "mode": "remote", "remotePath": "/some/remote/path", "port": 2345, "host": "127.0.0.1", "program": "${workspaceRoot}", "env": {}, "args": [], "showLog": true } 但是,它不会停在断点上。 我的程序崩溃,远程debugging器只说: log breakpoint 2017/08/15 14:34:21 sql: no rows in result set 2017/08/15 14:34:22 debugger.go:473: halting 我知道我的断点的path被访问,因为我在之前添加了一个日志logging探针。 任何想法,为什么它不停止在断点?