Skip to content

Instantly share code, notes, and snippets.

@harry-cpp
Created December 27, 2015 12:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harry-cpp/f8225df1bc13f983d530 to your computer and use it in GitHub Desktop.
Save harry-cpp/f8225df1bc13f983d530 to your computer and use it in GitHub Desktop.
VSCode + MonoGame
class Game1 : Game
{
protected override void LoadContent()
{
#if DEBUG
var proc = new Process();
proc.StartInfo.FileName = "/bin/bash";
proc.StartInfo.Arguments = "-c \"wmctrl -r 'Terminal' -b add,below && wmctrl -r '" + Window.Title + "' -b add,above\"";
proc.StartInfo.UseShellExecute = false;
proc.Start ();
#endif
}
protected override void EndRun()
{
#if DEBUG
var proc = new Process();
proc.StartInfo.FileName = "/bin/bash";
proc.StartInfo.Arguments = "-c \"wmctrl -c 'Terminal'\"";
proc.StartInfo.UseShellExecute = false;
proc.Start ();
#endif
}
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "mono",
"request": "launch",
"program": "bin/Debug/<GameName>.exe",
"args": [],
"cwd": ".",
"runtimeExecutable": null,
"env": {}
},
{
"name": "Attach",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 5858
}
]
}
// Place your settings in this file to overwrite default and user settings.
{
// exclude C# output stuff
"files.exclude": {
"bin/**": true,
"obj/**": true,
"Content/bin/**": true,
"Content/obj/**": true,
"*.userprefs": true
}
}
// A task runner that calls xbuild and
// Compiles .sln file
{
"version": "0.1.0",
"command": "xbuild",
"isShellCommand": true,
"showOutput": "silent",
"args": [
"<SolutionNameHere>.sln",
"/t:Build",
"/p:Configuration=Debug"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment