User Tools

Site Tools


developer_tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
developer_tools [2018/10/28 22:35]
rryan
developer_tools [2018/10/31 00:53]
rryan Add a section on ack-like tools.
Line 22: Line 22:
   * Set up [[emacs|Emacs]]   * Set up [[emacs|Emacs]]
   * Set up [[QtCreator]]   * Set up [[QtCreator]]
 +  * Set up [[Xcode]]
  
 ====== Debugging Tools ====== ====== Debugging Tools ======
Line 33: Line 34:
   * The ability to debug the render process of a QWidget, showing you at each step of a QPainter what the widget looks like, including performance details about each step.   * The ability to debug the render process of a QWidget, showing you at each step of a QPainter what the widget looks like, including performance details about each step.
  
-====== Console development tools ======+===== Debuggers ​=====
  
-On Ubuntu LinuxG uses:+Debuggers allow you to inspect the state of Mixxx while its running (and after Mixxx has crashedvia a core dump file). ​
  
-===== grep (wcolor===== +  * [[https://​www.gnu.org/​software/​gdb/​|gdb]] (for gcc
-  * [[http://packages.ubuntu.com/hardy/grep|grep]]+  * [[https://lldb.llvm.org/|lldb]] (for Clang) 
 +  * Visual Studio (Windows-only)
  
-  export GREP_COLOR='​1;​33'​ +===== Profilers =====
-  export GREP_OPTIONS=--color=auto+
  
-===== colordiff ===== +See [[profiling]].
-  * [[http://​packages.ubuntu.com/​hardy/​colordiff|colordiff]]+
  
-  alias svndiff='​(echo "​Running SVN diff (your changes vs. the repo)..."​ && (svn -x -w diff|colordiff))|less -R' 
-  alias svnbasediff='​(echo "​Running SVN diff against BASE:HEAD (changes in the repo since last \"svn update\"​)..."​ && (svn diff -x -w -rBASE:​HEAD|colordiff))|less -R' 
  
-  * diff -y with automatic adjustment for term width.+====== Command-line Tools ======
  
-  alias ydiff='​y_diff'​ +===== grep / ack / ag / ripgrep =====
-  function y_diff() { +
-    diff --width=${COLUMNS} -b -y "​$1"​ "​$2"​ | colordiff | less -R +
-  }+
  
 +''​grep''​ is nice for searching files with regexes, but it isn't designed specifically for looking through source code. There are a number of tools that make searching through source repositories much nicer (e.g. they won't go searching in the ''​.git''​ subfolder, or digging through binary files for your search string).
  
-===== colormake and colorgcc ==== +  * [[https://​beyondgrep.com/​|ack]] 
-  * [[http://packages.ubuntu.com/hardy/colormake|colormake]] [[http://packages.ubuntu.com/hardy/colorgcc|colorgcc]]+  * [[https://blog.burntsushi.net/ripgrep/|ripgrep]] 
 +  * [[https://geoff.greer.fm/ag/|ag / The Silver Searcher]]
  
-  ### Color GCC 
-  if [ -z "​`which colorgcc`"​ ]; then 
-    echo Installing ColorGCC ... 
-    sudo aptitude install colorgcc 
-  fi 
-  if [ ! -z "​`which colorgcc`"​ ]; then 
-    export CC="​colorgcc"​ 
-    alias gcc='​colorgcc'​ 
-    for C in `grep /usr/bin /​etc/​colorgcc/​colorgccrc | sed -e 's/# //' -e '​s/:​.*//'​`;​ do 
-      if [ ! -e /​usr/​local/​bin/​${C} ]; then 
-        echo "​Installing colorgcc wrapper in /​usr/​local/​bin for ${C}... " 
-        sudo ln -s /​usr/​bin/​colorgcc /​usr/​local/​bin/​${C} 
-      fi 
-    done 
-  fi 
-  ### Color Make 
-  if [ -z "​`which colormake`"​ ]; then 
-    echo Installing ColorMake ... 
-    sudo aptitude install colormake 
-  fi 
-  if [ ! -z "​`which colormake`"​ ]; then 
-    alias make='​colormake'​ 
-    if [ ! -e /​usr/​local/​bin/​make ]; then 
-      sudo ln -s /​usr/​bin/​colormake /​usr/​local/​bin/​make 
-    fi 
-  fi 
  
-===== source-highlight ===== 
-  * [[http://​packages.ubuntu.com/​hardy/​source-highlight|source-highlight]] 
-  * Usage: ​ 
-    * vs somefile.cpp 
-    * vs SConscript 
  
-  alias vs="​view_source"​ 
-  function view_source { 
-    lang_def=""​ 
-    case "​`basename $1`" in 
-      SConscript|SConstruct) lang_def=python.lang;;​ 
-      .bashrc|.bashrc-extra) lang_def=sh.lang;;​ 
-      # *) lang_def=cpp;;​ 
-    esac 
-    if [ ! -z "​${lang_def}"​ ]; then lang_def="​--lang-def=${lang_def}";​ fi 
-  ​ 
-    echo -e "​\033]0;​view-source:​ $1\007\c"​ 
-    source-highlight ${lang_def} --out-format=esc --output=STDOUT "​$1"​ 2>/​dev/​null | less -RN 
-  } 
  
-===== Nano editor ===== 
  
-  * [[http://​nano-editor.org|nano editor]] with color syntax highlighting 
- 
-  * Syntax color highlighting [[http://​stacktrace.org/​archive/​.nanorc|.nanorc file]], you may have to run dos2unix on it. 
- 
-  * Usage: ​ 
-    * nano somefile.cpp:​326:​error:​ some compiler error message 
- 
-  alias nano='​smart_nano'​ 
-  ## Smart nano jumps to a line number when you give it filename:​nnn where nnn is the line number (like compile warnings/​errors) 
-  function smart_nano() { 
-    if [ -z "​$(echo \"​[email protected]\"​ | egrep [a-zA-Z0-9]:​[0-9]+)"​ ]; then 
-      /​usr/​bin/​nano -w -c "​[email protected]"​ 
-      return 
-    fi 
-    unset args 
-    echo 
-    while (( "​$#"​ )); do 
-      if [ ! -z "​${1}"​ ] && [ ! -z "`echo ${1}|cut -d: -f2|grep -e '​^[0-9]*$'​`"​ ]; then 
-        args[${#​args[@]}]=+$(echo ${1}|cut -d: -f2|grep -e '​^[0-9]*$'​) # Line Number Offset 
-        args[${#​args[@]}]=$(echo ${1}|cut -d: -f1) # File Name 
-      elif [ -f "​${1}"​ ]; then 
-        args[${#​args[@]}]=$1 
-      else 
-        echo "Nano could not find: $1"; sleep .5 
-      fi 
-      shift 
-    done 
-    /​usr/​bin/​nano -w -c "​${args[@]}"​ 
-  } 
developer_tools.txt · Last modified: 2019/06/15 07:11 by ferranpujolcamins