pycharm compound run in debug - debugging

I'm using the compound feature in pycharm to run multiple configurations at once. I would like to run them in debug mode instead. All or some of them.
Is it possible? I can't find a way to tell pycharm I want to run a specific configuration in debug mode.

Related

GoLand IDE: Debug program initiated by shell script (Kubernetes local cluster)

I'm a beginner to Kubernetes, and I tried to understand the source code by debugging from GoLand IDE. Starting a cluster with the provided hack/local-up-cluster.sh script works fine, but I cannot debug in GoLand.
I've tried to edit Run -> EditConfigurations-> +Shell Script with the script path as hack/local-up-cluster.sh, the script could run successfully but it won't stop at any break point.
Can someone please help me on how to set the IDE to debug the code initiated by a shell script?
If you don't use the IDE to launch the process, then you can use the Run | Attach to process feature to attach the IDE debugger to an existing project.
Make sure that the compiled application has the optimizations turned off, if you are using Go 1.10+ the compiler flag is -gcflags="all=-N -l".

how to hygieia application in Debug mode

I have setup Hygieia (https://github.com/capitalone/Hygieia) in my local machine and when i started the app from command prompt , I am able to see the dashboard in my browser, as required.
Details about my workspace
1)I am using STS ide
2)for running/starting the application(as mentioned in the documentation).
I use windows-command prompt, and use command like (eg)
java -jar api.jar --spring.config.location=C:\[path to]\Hygieia\api\api.properties
I wanted to see the application working in debug mode when i start any module (say for eg., i wanted to debug and see how data is collected and inserted while running the module:- Collector-AWS).
Could you please let me know how would I debug the application -module (or to run the application in debug mode and inspect values ) inside IDE or any other way.
I tried the way {Debug as->Java Application} as mentioned in some other solutions but that didn't work.
kindly assist
Modify your command to add -Xdebug flag. like this:
java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \ -jar api.jar --spring.config.location=C:\[path to]\Hygieia\api\api.properties

vscode launch webserver before start debugging

My intention is to start automatically an internal webserver (using express extension https://marketplace.visualstudio.com/items?itemName=Compulim.vscode-express) with a launch configuration in the preLaunchTask property. For debugging I'm using Debugger for Chrome in vscode.
Express offers vscode commands like 'express.hostWorkspace' or 'express.hostWorkspaceWithRandomPort'.
I tried to config this vscode commands in a task and use this task in the preLaunchTask property, but it doesn't worked.
Is it possibile to run vscode commands as a task and use it in preLaunchTask or is there an other possibility?

How to debug revel app in goland?

I would like to debug my revel application with Jetbrain's gogland built in debugger but gogland run configuration allowing to setup either package or file run scenario not debug process started by revel run myapp.
Now Gogland is Goland
I find official manual for create debug-config. I'll post here if you do not mind...
INTELLIJ DEBUGGING (GOLAND)
Create your project, for this example i will be using canonical “revel new github.com/myaccount/my-app”
“revel run github.com/myaccount/my-app” to generate tmp/main.go - this file is needed by intellij
Shutdown the running server
Create run configuration and in “Program arguments” add “-importPath github.com\myaccount\my-app -srcPath \src -runMode dev"
Point “File” to \src\github.com\myaccount\my-app\app\tmp\main.go
In “before launch” add “Run external tool”. There: Program: \bin\revel(.exe) Paramerets: build github.com/myaccount/my-app
It works for Linux&Windows
AFAIK, Gogland built-in debugger is delve.
I think you must try run debug with option attach:
Attach to an already running process and begin debugging it.
This command will cause Delve to take control of an already running process, and
begin a new debug session. When exiting the debug session you will have the
option to let the process continue or kill it.
Usage:
dlv attach pid [flags]
I don't have installed gogland now, but I had similar problem in past.

How do I start the pylons web application programmatically?

Normally, we start a pylons web application via command line:
pastser serve --reload development.ini
I wanna know can we start it programmaticly? In a python script file?
I want this because I can start it in IDE, and use the debugger
#!/usr/bin/env python
from paste.script.serve import ServeCommand
ServeCommand("serve").run(["--reload", "development.ini"])
...some IDEs (e.g. pydev) won't support breakpoints in debug mode if you have --reload enabled. Simply remove it from the list you pass to .run() to disable the reload functionality and enable IDE breakpoints.
That sounds like a job for a shell script - you could launch it from a Python script, but a shell script is likely to be cheaper in terms of mental effort.

Resources