@@ -334,8 +334,8 @@ pub async fn run_cli(cli: Cli) -> anyhow::Result<()> {
334334 debug ! ( "No path provided, using default: {}" , default_path) ;
335335 default_path
336336 } ) ;
337- // first parse existing esp_idf.json (using parse_esp_idf_json)
338-
337+ // first parse existing esp_idf.json (using parse_esp_idf_json) || previous VSCode installations
338+ info ! ( "Searching for esp_idf.json files..." ) ;
339339 let search_patch = Path :: new ( & path) ;
340340 let esp_idf_json_path = find_by_name_and_extension (
341341 search_patch,
@@ -358,6 +358,31 @@ pub async fn run_cli(cli: Cli) -> anyhow::Result<()> {
358358 }
359359 }
360360 }
361+ // second try to find tool_set_config.json (using parse_tool_set_config) || previous Eclipse installations
362+ info ! ( "Searching for tool_set_config.json files..." ) ;
363+ let tool_set_config_path = find_by_name_and_extension (
364+ search_patch,
365+ "tool_set_config" ,
366+ "json" ,
367+ ) ;
368+ if tool_set_config_path. is_empty ( ) {
369+ info ! ( "No tool_set_config.json found" ) ;
370+ } else {
371+ info ! ( "Found {} tool_set_config.json files:" , tool_set_config_path. len( ) ) ;
372+ }
373+ for path in tool_set_config_path {
374+ info ! ( "- {} " , & path) ;
375+ match idf_im_lib:: utils:: parse_tool_set_config ( & path) {
376+ Ok ( _) => {
377+ info ! ( "Parsed config: {:?}" , path) ;
378+ }
379+ Err ( err) => {
380+ info ! ( "Failed to parse tool_set_config.json: {}" , err) ;
381+ }
382+ }
383+ }
384+ // third try to find IDF directories (using find_esp_idf_folders) || previous instalation from cli
385+ info ! ( "Searching for any other IDF directories..." ) ;
361386 let idf_dirs = idf_im_lib:: version_manager:: find_esp_idf_folders ( & path) ;
362387 if idf_dirs. is_empty ( ) {
363388 info ! ( "No IDF directories found" ) ;
0 commit comments