From: Igor Kulaychuk Date: Sat, 25 Aug 2018 20:59:32 +0000 (+0300) Subject: Update README X-Git-Tag: submit/tizen/20180921.084208~2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=358d66b2b9831ef2d24dfce93015a9a5a112cdf3;p=sdk%2Ftools%2Fnetcoredbg.git Update README --- diff --git a/README.md b/README.md index 18a15f9..bffb182 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,62 @@ # Debugger for .NET Core runtime -The debugger provides GDB/MI or VSCode debug adapter interface and allows to debug .NET apps under .NET Core runtime. +The debugger provides GDB/MI or VSCode Debug Adapter protocol and allows to debug .NET apps under .NET Core runtime. -## Build (Ubuntu x64) +## Build -1. Install .NET Core SDK 2.0+ from https://dot.net/core +Build coreclr for your platform, see https://github.com/dotnet/coreclr for instructions. -2. Build coreclr, see https://github.com/dotnet/coreclr for instructions +Switch to `netcoredbg` directory, create `build` directory and switch into it: +``` +mkdir build +cd build +``` -3. Build the debugger with `cmake` and `clang` (assuming current directory is project root, coreclr is cloned and built next to debugger directory): - ``` - mkdir build - cd build +Proceed to build with `cmake`. - CC=clang CXX=clang++ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../bin +> If `coreclr` and `netcoredbg` directories are next to each other, necessary `coreclr` files would be located automatically. Otherwise add `-DCLR_DIR=/coreclr` to `cmake` command. - make -j - make install - ``` +### Ubuntu - CMake accepts additional options: +``` +CC=clang CXX=clang++ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../bin +``` - `-DCLR_DIR=$HOME/git/coreclr` path to coreclr source root directory +### macOS - `-DCLR_BIN_DIR=$HOME/git/coreclr/bin/Product/Linux.x64.Debug` path to coreclr build result directory +``` +cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../bin +``` -4. The above commands create `./bin` directory with `netcoredbg` binary and additional libraries. +### Windows - Now running the debugger with `--help` option should look like this: - ``` - $ ../bin/netcoredbg --help - .NET Core debugger for Linux/macOS. +``` +cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX="$pwd\..\bin" +``` - Options: - --attach Attach the debugger to the specified process id. - --interpreter=mi Puts the debugger into MI mode. - --interpreter=vscode Puts the debugger into VS Code Debugger mode. - --engineLogging[=] Enable logging to VsDbg-UI or file for the engine. - Only supported by the VsCode interpreter. - --server[=port_num] Start the debugger listening for requests on the - specified TCP/IP port instead of stdin/out. If port is not specified - TCP 4711 will be used. - ``` +Compile and install: +``` +cmake --build . --target install +``` + + +## Run + +The above commands create `bin` directory with `netcoredbg` binary and additional libraries. + +Now running the debugger with `--help` option should look like this: +``` +$ ../bin/netcoredbg --help +.NET Core debugger + +Options: +--attach Attach the debugger to the specified process id. +--interpreter=mi Puts the debugger into MI mode. +--interpreter=vscode Puts the debugger into VS Code Debugger mode. +--engineLogging[=] Enable logging to VsDbg-UI or file for the engine. + Only supported by the VsCode interpreter. +--server[=port_num] Start the debugger listening for requests on the + specified TCP/IP port instead of stdin/out. If port is not specified + TCP 4711 will be used. +``` diff --git a/src/debug/netcoredbg/main.cpp b/src/debug/netcoredbg/main.cpp index dbfe063..f941bc7 100644 --- a/src/debug/netcoredbg/main.cpp +++ b/src/debug/netcoredbg/main.cpp @@ -17,7 +17,7 @@ static const uint16_t DEFAULT_SERVER_PORT = 4711; static void print_help() { fprintf(stdout, - ".NET Core debugger for Linux/macOS.\n" + ".NET Core debugger\n" "\n" "Options:\n" "--attach Attach the debugger to the specified process id.\n"