forked from GoogleCloudPlatform/google-cloud-dotnet-debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-debugger.sh
More file actions
executable file
·27 lines (23 loc) · 786 Bytes
/
start-debugger.sh
File metadata and controls
executable file
·27 lines (23 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#
# Script to help start the users application along with
# the .NET Core Stackdriver Debugger.
#
# Input should be the command to start the users .NET Core
# application as they normally would. For example if
# they would call 'dotnet HelloWorld.dll' they would
# just run ''./start-debugger.sh dotnet HelloWorld.dll'
start_command=
while (( "$#" )); do
start_command="$start_command $1"
shift
done
# Start the users application to avoid any slow down
# while starting the debugger.
$start_command &
# Start the debugger and attach to the users process.
APP_PID=$(echo $!)
# NOTE: This file path is based on logic in package.sh
/usr/share/dotnet-debugger/agent/Google.Cloud.Diagnostics.Debug --application-id=$APP_PID &
# Wait on the users process.
wait $APP_PID