How-tos

Advanced debugging for Node.js apps in Bluemix

Share this post:

While developing your applications on Bluemix, do you ever need the ability to debug with more than just logs? Have you wanted to use utilities like node-inspector, or simply shell into your Bluemix container? Good news, you can! Bluemix’s App Management includes four utilities for Node.js applications:

  • devconsole (development console)
  • shell (tty.js)
  • inspector (node-inspector)
  • hc (Health Center)

In this video, I demonstrate how to use App Management for Node.js applications on Bluemix:

As noted in the video, App Management is a set of development and management utilities that are enabled via environment variables for your Node.js application on Bluemix. Some quick reminders:

  • By default, the App Management utilities are installed with your application. To enable App Management utilities, set the BLUEMIX_APP_MGMT_ENABLE environment variable and restart your application.
    cf set-env <em>myapp</em> BLUEMIX_APP_MGMT_ENABLE devconsole

    You can set any of the following tools: devconsole, shell, inspector, trace, proxy and hc. Enable multiple utilities by separating utilities with a “+”. For example: BLUEMIX_APP_MGMT_ENABLE = devconsole+shell+inspector
  • Don’t forget! Run cf restage myapp after setting the BLUEMIX_APP_MGMT_ENABLE environment variable
  • To access the Application Management console, enter http://myapp.mybluemix.net/bluemix-debug/manage
  • If you do not want the App Management utilities to be installed with your application, set the BLUEMIX_APP_MGMT_INSTALL environment variable to ‘false’ and restage your application.
    cf se <em>myapp</em> BLUEMIX_APP_MGMT_INSTALL false
    cf restage <em>myapp</em>

See the documentation on App Management for a full list of utilities and more information.

Developer Advocate

More stories
May 1, 2019

Two Tutorials: Plan, Create, and Update Deployment Environments with Terraform

Multiple environments are pretty common in a project when building a solution. They support the different phases of the development cycle and the slight differences between the environments, like capacity, networking, credentials, and log verbosity. These two tutorials will show you how to manage the environments with Terraform.

Continue reading

April 29, 2019

Transforming Customer Experiences with AI Services (Part 1)

This is an experience from a recent customer engagement on transcribing customer conversations using IBM Watson AI services.

Continue reading

April 26, 2019

Analyze Logs and Monitor the Health of a Kubernetes Application with LogDNA and Sysdig

This post is an excerpt from a tutorial that shows how the IBM Log Analysis with LogDNA service can be used to configure and access logs of a Kubernetes application that is deployed on IBM Cloud.

Continue reading