Managing Variables Loading Policy
PyCharm debugging model provides three policies for loading values of variables:
Synchronously: variables are loaded all together.
Asynchronously: variables are loaded separately.
On demand: variables are loaded on user's request.
By default, variables are loaded asynchronously. To change the loading policy, click in the Debug Tool dialog toolbar, navigate to , and select the target policy from the list.
Note that any changes in the loading policies become effective after you rerun the debugging process.
Enable synchronous loading of variables
Select the corresponding option in the Variables Loading Policy list.
Launch a debugging session.
Debugger shows the
Collecting data message, and after that the variables' values are loaded.
Manage the asynchronous loading of variables
This policy is enabled by default. You need to enable it using the Variables Loading Policy settings of the Debug tool dialog only when you're changing any previously selected policy.
If loading a variable takes a long time, the debugger shows
...Loading Value. When the loading is low, you might see the
Loading timed outmessages.
Mind the warning message in the Variables that prompts switching to the on demand policy.
Click Switch to loading on demand in the warning to enable the On demand policy.
Load variables on demand
To enable the On demand variables loading policy, choose the corresponding option in the Variables Loading Policy settings of the Debug tool dialog or click the Switch to loading on demand link in the Variables area of the Debug tool dialog.
You will see one or several Show Value messages. Click them to load variable's values.
Preview big data collections
When you operate with the substantial amount of data, you need to preview data collections with hundreds of elements. By default, you can preview only the first 100 elements. To load the remaining data:
Expand the target variable in the Variables tab.
Scroll down to the latest visible element.
Double-click or press Enter to see 100 more remaining elements.