how to automatically breakpoint when Django project fails in Docker environment - pdb

I have a Django project running in Docker environment, but it keeps on restarting due to some errors, which does not give me an opportunity to docker attach <container id> to further debug using PDB.
Is it possible to automatically pause the program at failure point and set breakpoint for further debug?
If python PDB is not capable to doing so, any other tools can do ?

On the deployment side, logging could help.

Related

How to run shell commands in intellij after debugger ends

I'm trying to spin up docker container when I run a particular configuration in intellij, which I have done successfully by adding a 'Before Launch external tool command', as described here:
IntelliJ IDEA: Running a shell script as a Run/Debug Configuration
What doesn't seem obvious though is how I stop the container when the program has finished running? There doesn't seem to be any options for after.
How do I run a shell script when my run configuration finishes? (Either by reaching it's end, or being forcefully stopped).

HP UFT and LR are blocking execution of other IDEs

IntelliJ IDEA Community Edition and Eclipse cannot be started after UFT and LR are installed on Windows 8.1. These applications can be started only as an administrator user. When I try to execute as a standard user I don't get any error message, seemly nothing happens, application is not started. Applications can be executed as administrator user, but don't working properly. It means Maven dependencies aren't resolved in IntelliJ IDEA and browser session cannot be started by Katalon Studio. I can't find any error logs.
When you install UFT/LR they update the JAVA OPTIONS
_JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1
\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
IBM_JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1
\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Just make a batch file for launching eclipse and intellij and remove these hooks and it should work. These hooks are usually added for automation and recording to work. Most of the time they are supposed to be transparent and not create an issue but with some apps they may cause partial issues.
This could be the same happening. The easiest way to test is to backup the values of these environment variables and then delete them and test if IDE works fine again

how to setup the environment to debug the Restcomm-smsc source code

can you please describe me how to setup a development environment with intellij IDEA for restcomm-smsc to debug run compile build and doing breakpoints etc.
i am using ubuntu 14.04.
i could run the smsc gateway from the binary package and do the simulator tests but when it comes to do some coding and debugging and building stuff, i cannot creat e the correct development environment for restcomm-smsc source code.
i really appreciate if you can guide me simply how to do it?
Thanks a lot
BR
Gokhan
Do you want to debug application deployed on JBoss? If so you need to simply add/uncomment JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=n" in run.sh/standalone.sh.
In intellij Run -> Edit Configurations -> Remote and provide jboss IP and port from JAVA_OPTS.

Jenkins CI - java.exe child process hangs after job is done

I have following problem: on my Jenkins 1.438 I have job with maven 3 application. When I run it, sometimes after build is completed successfully Jenkins child process - java.exe - still hangs in the system. It also holds a handle to POM file and when I run my job again i get error that POM file cannot be deleted and build fails. Does anyone know how to fix this? Jenkins runs on Windows Server 2008
We experienced the same problem with Jenkins (on a Linux server).
I'm not sure if you can achieve this with Powershell in Windows server (or use windows-port of bash etc), but for example we start and stop our builds in Jenkins with seperated starter and stopper shell scripts. The point: start script saves the PID of the java process being started into a text file, and the stop script reads it and kills after a given amount of time.

how to run Activemq program in java

i have install activemq 5.5.1 in my c:\programFiles\activemq\...
and from the command prompt i have installed it and set enviroment variable.
and i have also run it. and it is also running on local host.
i have write a java program in my eclipse editor.
and i have added Activiemq library in project form that path.
programm:
http://developers-blog.org/blog/default/2008/10/28/A-simple-ActiveMQ-example
but i am also confuse What the use of that c:\programFiles\activemq... installation how i use it.
I want to only to create my first Activiemq program through java.
plz help
The installation of ActiveMQ gives you everything you need to run the broker standalone by just running the activemq.bat under the bin directory. It's just a nice way of packaging the application as opposed to just giving you some jar files.
If you want to run the broker inside a Java program you just need to include the jars for the broker and you won't need to use the installation directory again.