Debug your modules, shell commands

Since Restful Framework is hosted in the cloud and there is no downloadable version - you cannot have a server infrastructure in your own development machine -, one of toolkit components is the test server.

The test server is a console application that receiver 3 arguments (order is important!):
  1. Command module location (for example, C:\yourcommandmodule.dll).
  2. Command type name (for example, NamespaceA.CommandClassName).
  3. Command text (for example, your-command @arg "hello world").

A sample test server execution would start by typing in CMD:

restfulcommandtester.exe "C:\yourcommandmodule.dll" "NamespaceA.CommandClassName" "your-command @arg 'hello world'"

But don't worry: toolkit has integrated test server on top of Visual Studio in order to let you interactively debug your commands.

Activate "Restful SDK" toolbar and you are going to visualize a "Debug Restful Command" button.

In order to debug a command, open a command module project and the C# code file having the command class in Visual Studio and press Debug Restful Command button.

Above action starts test server with the right command-line arguments in a single click!

Set some breakpoints in your code and just debug like any other kind of project.

Test server will not be able to debug your commands if the command class is malformed. Check that:
  • Command class inherits ShellCommand.
  • Command class has a ShellCommandName(System.String) attribute, and attribute's constructor argument "name" has a right name.

Last edited Jul 22, 2012 at 3:23 PM by MFidemraizer, version 3


No comments yet.