<type>documentation</type>
<domain>debug</domain>
<id>main-entry-point</id>
<title>Specifying Main Entry Point</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>per+</product>

Normally, Wing will start debugging in whatever file you have active in the current
editor. Depending on the nature of your project, you may wish to specify a file or a
`Named Entry Point <ref:debug/named-entry-points>`__ as the default debug and execution
starting point. This is done with ``Set Current As Main Entry Point`` in the ``Debug``
menu, by right clicking on a file in the ``Project`` tool and selecting ``Set As Main
Entry Point``, or by setting `Main Entry Point
<script:view_project_properties#highlighted_attrib="proj.main-file">`__ in ``Project
Properties``.

When a main entry point is defined, it is used whenever you start the debugger,
except if a specific file is debugged, for example with ``Debug Current File`` in the
``Debug`` menu.

The path to the main entry point, if one is set, is highlighted in bold text in the
``Project`` tool.

The main entry point defined for a project is also used by source code analysis to
determine the Python path to use for analysis. As a result, changing this value will cause
partial reanalysis of all source files. See `Source Code Analysis
<ref:edit/source-code-analysis>`__ for details.

