Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titlePrerequisite

This document assumes that you already have a development environment such as Impala dev. with IntelliJ. Please refer to IntelliJ and CLion Setup for Impala Development if you would like to know about IntelliJ on Impala. You can use Eclipse or other debugger tools.

...

1. Add a new item to remote. See "Remote Debugging" step in IntelliJ and CLion Setup for Impala Development. Fill in Name, Host and Port.

...

Code Block
languagetext
themeEmacs
~/Impala/fe$ mvn \
-Dmaven.surefire.debug="-Xdebug \
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 \
-Xnoagent \
-Djava.compiler=NONE" \
-fae \
-Dtest=AnalyzeStmtsTest#TestStar \
test
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Listening for transport dt_socket at address: 8000

Or simplify the command with the following procedure. Adds the function into your ~/.bashrc or ~/.bash_profile

Code Block
languagebash
themeEmacs
function mvn-debug-front-end() {
  local target_test=${1}
  if [[ -z ${target_test} ]]; then
    echo "Error: undefined target test"
  else
    mvn \
      -Dmaven.surefire.debug="-Xdebug \
      -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 \
      -Xnoagent \
      -Djava.compiler=NONE" \
      -fae \
      -Dtest=${target_test} \
      test
  fi
}

Run as below

Code Block
languagetext
themeEmacs
~/Impala/fe$ mvn-debug-front-end AnalyzeStmtsTest#TestStar
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Listening for transport dt_socket at address: 8000

...

4. Press debug icon on the top of the right side.

5. You can look into debugging information such as call stack, inspect variables and so on.

Image Added