-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle clrdbg to vsdbg rename #501
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ script_dir=`dirname $0` | |
|
||
print_help() | ||
{ | ||
echo 'InstallToVSCode.sh <link|copy> <oss-dev|alpha|insiders|stable> <open-debug-ad7-dir> -d <clrdbg-binaries>' | ||
echo 'InstallToVSCode.sh <link|copy> <oss-dev|alpha|insiders|stable> <open-debug-ad7-dir> -d <vsdbg-binaries>' | ||
echo '' | ||
echo 'This script is used to copy files needed to enable MIEngine based debugging' | ||
echo 'into VS Code.' | ||
|
@@ -19,10 +19,10 @@ print_help() | |
echo ' stable: Install to VSCode stable' | ||
echo '' | ||
echo ' open-debug-ad7-dir : Root of the OpenDebugAD7 repo' | ||
echo ' clrdbg-binaries-dir : Directory containing clrdbg binaries' | ||
echo ' vsdbg-binaries-dir : Directory containing vsdbg binaries' | ||
echo '' | ||
echo 'Example:' | ||
echo "$script_dir/InstallToVSCode.sh link alpha /Volumes/dd/OpenDebugAD7 -d ~/clrdbg/out/Linux/bin/x64.Debug/clrdbg" | ||
echo "$script_dir/InstallToVSCode.sh link alpha /Volumes/dd/OpenDebugAD7 -d ~/vsdbg/out/Linux/bin/x64.Debug/vsdbg" | ||
} | ||
|
||
# Copies a file to another file or directory | ||
|
@@ -119,7 +119,7 @@ SetupSymLink() | |
rm -r $1 | ||
fi | ||
fi | ||
|
||
ln -s $2 $1 | ||
return $? | ||
} | ||
|
@@ -171,15 +171,15 @@ pushd $DropDir >/dev/null | |
DropDir=$(pwd) | ||
popd >/dev/null | ||
|
||
[ ! "$4" == "-d" ] && echo "ERROR: Bad command line argument. Expected '-d <clrdbg-dir>'." && exit 1 | ||
CLRDBGBITSDIR=${5:?"ERROR: Clrdbg binaries directory must be specified with -d option. See -h for usage."} | ||
[ ! -f "$CLRDBGBITSDIR/clrdbg" ] && echo "ERROR: $CLRDBGBITSDIR/clrdbg does not exist." && exit 1 | ||
[ ! "$4" == "-d" ] && echo "ERROR: Bad command line argument. Expected '-d <vsdbg-dir>'." && exit 1 | ||
VSDBGBITSDIR=${5:?"ERROR: VsDbg binaries directory must be specified with -d option. See -h for usage."} | ||
[ ! -f "$VSDBGBITSDIR/vsdbg" ] && echo "ERROR: $VSDBGBITSDIR/vsdbg does not exist." && exit 1 | ||
DESTDIR=$HOME/.MIEngine-VSCode-Debug | ||
|
||
VSCodeExtensionsRoot=$HOME/$VSCodeDirName/extensions | ||
[ ! -d "$VSCodeExtensionsRoot" ] && echo "ERROR: $VSCodeExtensionsRoot does not exist." && exit 1 | ||
|
||
CSharpExtensionRoot="$(ls -d $VSCodeExtensionsRoot/ms-vscode.csharp-* 2>/dev/null)" | ||
CSharpExtensionRoot="$(ls -d $VSCodeExtensionsRoot/ms-vscode.csharp-* 2>/dev/null)" | ||
[ "$CSharpExtensionRoot" == "" ] && echo "ERROR: C# extension is not installed in VS Code. No directory matching '$VSCodeExtensionsRoot/ms-vscode.csharp-*' found." && exit 1 | ||
|
||
num_results=$(echo "$CSharpExtensionRoot" | wc -l) | ||
|
@@ -194,7 +194,7 @@ fi | |
mkdir -p "$DESTDIR" | ||
[ $? -ne 0 ] && echo "ERROR: unable to create destination directory '$DESTDIR'." && exit 1 | ||
|
||
hash dotnet 2>/dev/null | ||
hash dotnet 2>/dev/null | ||
[ $? -ne 0 ] && echo "ERROR: The .NET CLI is not installed. see: http://dotnet.github.io/getting-started/" && exit 1 | ||
|
||
SetupSymLink "$CSharpExtensionRoot/coreclr-debug/debugAdapters" "$DESTDIR" | ||
|
@@ -237,40 +237,44 @@ mv "$DESTDIR/dummy" "$DESTDIR/OpenDebugAD7" | |
|
||
InstallError= | ||
install_module "$OpenDebugAD7BinDir/dar.exe" | ||
install_module "$OpenDebugAD7BinDir/xunit.console.netcore.exe" "" ignoreMissingPdbs | ||
install_module "$OpenDebugAD7BinDir/xunit.console.netcore.exe" "" ignoreMissingPdbs | ||
for dll in $(ls $OpenDebugAD7BinDir/*.dll); do | ||
install_module "$dll" "" ignoreMissingPdbs | ||
done | ||
|
||
echo '' | ||
echo "Installing clrdbg bits from $CLRDBGBITSDIR" | ||
echo "Installing vsdbg bits from $VSDBGBITSDIR" | ||
|
||
for clrdbgFile in $(ls $CLRDBGBITSDIR/*); do | ||
if [ -f "$clrdbgFile" ]; then | ||
for vsdbgFile in $(ls $VSDBGBITSDIR/*); do | ||
if [ -f "$vsdbgFile" ]; then | ||
# NOTE: We ignore files that already exist. This is because we have already | ||
# cleaned the directory originally, and published CoreCLR files. Replacing existing | ||
# files will replace some of those CoreCLR files with new copies that will not work. | ||
install_new_file "$clrdbgFile" | ||
install_new_file "$vsdbgFile" | ||
fi | ||
done | ||
for directory in $(ls -d $CLRDBGBITSDIR/*/); do | ||
|
||
for directory in $(ls -d $VSDBGBITSDIR/*/); do | ||
directory_name=$(basename $directory) | ||
|
||
if [ ! -d "$DESTDIR/$directory_name" ]; then | ||
mkdir "$DESTDIR/$directory_name" | ||
fi | ||
|
||
for dll in $(ls $directory/*.dll); do | ||
install_file "$dll" "$directory_name/" | ||
done | ||
done | ||
|
||
# Rename vsdbg back to clrdbg | ||
mv "$DESTDIR/vsdbg" "$DESTDIR/clrdbg" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||
[ $? -ne 0 ] && echo "ERROR: Unable to move vsdbg executable." && exit 1 | ||
|
||
install_file "$script_dir/coreclr/coreclr.ad7Engine.json" | ||
install_file "$DropDir/osxlaunchhelper.scpt" | ||
|
||
for dll in Microsoft.MICore.dll Microsoft.MIDebugEngine.dll | ||
do | ||
do | ||
install_module "$DropDir/$dll" | ||
done | ||
|
||
|
@@ -290,7 +294,7 @@ fi | |
# Write out an install.complete file so that the C# extension doesn't try to restore. | ||
echo "InstallToVSCode.sh done">$DESTDIR/install.complete | ||
|
||
echo "InstallToVSCode.sh succeeded. Open directory '$OpenDebugAD7Dir' in VS Code" | ||
echo "InstallToVSCode.sh succeeded. Open directory '$OpenDebugAD7Dir' in VS Code" | ||
echo "to debug. Edit .vscode/launch.json before launching." | ||
echo "" | ||
exit 0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it worth having this part behind an option so we can toggle whether to rename it or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, these scripts are already forked, so I don't expect there to be much more long-term use for them.