Skip to content

Contributors Debug

Dan Marshall edited this page Nov 6, 2015 · 3 revisions

To be a contributor to Maker.js, you might like to set up a debug environment.

For Visual Studio 2013/2015

BEFORE cloning the repo, follow these steps:

  1. Launch Visual Studio 2013 and Select File > New Project.
  2. In the New Project dialog, navigate to: Installed > Templates > TypeScript.
  3. Select HTML Application with TypeScript, choose a location then click OK.
  4. In the Solution Explorer, delete the files: app.css, app.ts, and index.html.
  5. Now you may clone the repo. Open a git shell and navigate to the location of this VS project.
  6. In git shell, enter git clone https://github.com/Microsoft/Maker.js.git (or the url of your fork)
  7. In Visual Studio's Solution Explorer, click the icon that says Show All Files.
  8. Right-click on the maker.js folder and select Include In Project.
  9. Click the Show All Files icon again to stop showing all files.
  10. Expand the maker.js/debug folder,right click on viewer.html, and select Set As Start Page.
  11. Some .ts files will prevent a successful build. Right click these files and select Exclude from project: target/ts/makerjs.d.ts, examples/ventgrid.ts, examples/ventgrid.d.ts, examples/ventgridcircle.ts.
  12. Press F5 to build and run the project. You should see a functional test page.
  13. In Visual Studio Solution Explorer, open maker.js/src/svg.ts and set a breakpoint.
  14. Refresh the browser to make sure you hit the breakpoint.

Note: with this scenario, you will not need to build every time you make a code change. Visual Studio does a background compile for you. Just save your .ts file and refresh your browser.

Happy debugging!

Clone this wiki locally