I am trying to debug a very simple python script:
import arcpy
print('OK')I am using Visual Studio Code (Windows 10 x64) which has been executed from a BAT file which activates C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\proenv.bat before hand to ensure that the python environment is setup for ArcGIS Pro usage.
When I try to debug the script sometimes the script prints OK and sometimes is just crashes python on the first line. A try/except doesn't work here since the first line is causing python to completely crash and it will never reach the except part. I can repeat running the script in debug mode and to me it seems very random if it completes or crashes.
So far I haven't found any log entries anywhere which describes what is happening. It could be that the import part is checking for a valid license (I am using concurrent licensing) and that something in that check is faulting but it is very difficult to tell since I get no clues at all from the crash.
Can anyone give me a hint to where I can find more details or what could be the reason for these crashes?