Debugging simulations - AWS SimSpace Weaver

Debugging simulations

You can use the following methods to get information about your simulations.

Use SimSpace Weaver Local and look at console output

We recommend that you develop your simulations locally first and then run them in the AWS Cloud. You can view console output directly when you run with SimSpace Weaver Local. For more information, see Local development.

Look at your logs in Amazon CloudWatch Logs

When you run your simulation in the AWS Cloud the console output of your apps is sent to log streams in Amazon CloudWatch Logs. Your simulation also writes other log data. You must enable logging in your simulation schema if you want your simulation to write log data. For more information, see SimSpace Weaver logs in Amazon CloudWatch Logs.

Warning

Your simulation can produce large amounts of log data. The log data can grow very quickly. You should watch your logs closely and stop your simulations when you don't need them running anymore. Logging can create large costs.

Use describe API calls

You can use the following service APIs to get information about your simulations in the AWS Cloud.

Important

If you use AWS IAM Identity Center or named profiles for the AWS Command Line Interface (AWS CLI), you must use SimSpace Weaver app SDK version 1.12.1 or higher. The latest version is 1.16.0. For information about SimSpace Weaver versions, see SimSpace Weaver versions. The SimSpace Weaver app SDK scripts use the AWS CLI. If you use IAM Identity Center, you can either copy your IAM Identity Center profile for the AWS CLI to your default profile or provide the name of your IAM Identity Center profile to SimSpace Weaver app SDK scripts with the --profile cli-profile-name parameter. For more information, see Configuring the AWS CLI to use AWS IAM Identity Center in the AWS Command Line Interface User Guide and Configuration and credential file settings in the AWS Command Line Interface User Guide.

  • ListSimulations – get a list of all of your simulations in the AWS Cloud.

    Example
    tools\windows\weaver-MyProject-cli.bat list-simulations
  • DescribeSimulation – get details about a simulation.

    Example
    tools\windows\weaver-MyProject-cli.bat describe-simulation --simulation MySimulation
  • DescribeApp – get details about an app.

    Example
    tools\windows\weaver-MyProject-cli.bat describe-app --simulation MySimulation --domain MyCustomDomain --app MyCustomApp

For more information about the SimSpace Weaver APIs, see SimSpace Weaver API references.

Connect a client

You can connect a client to a running custom or service app that you defined with an endpoint_config in your simulation schema. The SimSpace Weaver app SDK includes sample clients that you can use to view the sample application. You can look at the source code for these sample clients and the sample application to see how you can create your own clients. For more information about how to build and run the sample clients, see Step 5: View your simulation.

You can find the source code for the sample clients in the following folder:

  • sdk-folder\packaging-tools\clients\PathfindingSampleClients\