Skip to content
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

Openvs #1109

Merged
merged 4 commits into from Feb 17, 2016
Merged

Openvs #1109

merged 4 commits into from Feb 17, 2016

Conversation

glennblock
Copy link
Contributor

Sending the PR to give visibility and get some other eyes on it. Unit tests are still missing.

This introduces a new :openvs REPL command which creates a debuggable solution for scripts and then launches Visual Studio. You get full debugger support, step through, watches, etc!

Essentially it automates the approach here which @dschenkelman came up with. When you run the command, it will grab all scripts in the folder (including sub-folders) of the script you specified and add them to the solution.

Below you can see a screenshot of debugging a script in VS 2015 after running the command.

screen shot 2015-12-26 at 3 10 51 pm

Today this only supports Visual Studio as the project structure which it creates is not supported in VS Code, OR in Xamarin Studio. XS doesn't "seem" to have as rich support for an "exe" style project. I tried hacking the equivalent in using an XBuild project, but that didn't work. For reference, here is the .sln created for the screenshot.

A few community requests:

@mat-mcloughlin
Copy link

Going to tag in @nosami and @david-driscoll as they can probably offer seem contributions here

@glennblock
Copy link
Contributor Author

@scriptcs/core this has been completely refactored / cleaned up and now has full unit test coverage.

One breaking change, it introduces a TempPath property on IFileSystem which is used for grabbing the temp folder for writing the solution. This breaking change "could" be removed by moving the method to the IVisualStudioSolutionWriter, but it seemed like a gap that should be there so I added it.

@glennblock
Copy link
Contributor Author

@scriptcs/core I ended up moving everything in hosting, rather than core. The main reason is because it seemed inappropriate / heavy to put it in core.

void AddScriptcsProject(string scriptcsPath, string workingPath, string args, bool attach, string projectGuid);
void AddProject(string path, string name, string guid, string[] files);
void AddGlobalHeader(string projectGuid);
void AddGlobalNestedProjects(IList<Tuple<string, string>> nestedItems);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get a better signature on a public member here? i.e. a descriptive type instead of a list of Tuple which is very difficult to comprehend

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok
On Sun, Feb 14, 2016 at 4:41 AM Filip W notifications@github.com wrote:

In src/ScriptCs.Hosting/IVisualStudioSolution.cs
#1109 (comment):

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+
+namespace ScriptCs.Contracts
+{

  • public interface IVisualStudioSolution
  • {
  •    void AddHeader();
    
  •    void AddScriptcsProject(string scriptcsPath, string workingPath, string args, bool attach, string projectGuid);
    
  •    void AddProject(string path, string name, string guid, string[] files);
    
  •    void AddGlobalHeader(string projectGuid);
    
  •    void AddGlobalNestedProjects(IList<Tuple<string, string>> nestedItems);
    

can we get a better signature on a public member here? i.e. a descriptive
type instead of a list of Tuple which is very difficult to comprehend


Reply to this email directly or view it on GitHub
https://github.com/scriptcs/scriptcs/pull/1109/files#r52842100.

@glennblock
Copy link
Contributor Author

@filipw your move mate :-)

filipw added a commit that referenced this pull request Feb 17, 2016
@filipw filipw merged commit 79e8d6e into scriptcs:dev Feb 17, 2016
@filipw
Copy link
Member

filipw commented Feb 17, 2016

👍

@glennblock glennblock added this to the v0.16 milestone Apr 2, 2016
@glennblock glennblock changed the title Openide Openvs Apr 2, 2016
@glennblock glennblock deleted the openide branch January 3, 2017 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants